**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: uk-sky.com
* @MinSWversion: V1.1.1/55.26
* none
* @Revision 8 - [08/06/2016] Blackbear199
* season/episode improvements.added rating,rating icon
* @Revision 7 - [03/06/2016] Blackbear199
* get rid of duplicates
* @Revision 6 - [06/11/2015] Jan van Straaten
* Added productiondate
* @Revision 5 - [23/08/2015] Jan van Straaten
* Adapted to new (simpler) detail pages of the site
* @Revision 4 - [18/05/2012] Quake505
* Small change to the Part Scrub, Added an episode scrub, (yes again) - Ready for GA?
* @Revision 3 - []
* Changed the Part scrub again, also corrected the program start
* @Revision 2 - []
* Updates made recommend by Jan, updated the part scrub, updated productiondate and updated description mod
* @Revision 1 - []
* This is the first version of the file
* @Remarks:
* less details than before!
* @header_end
**------------------------------------------------------------------------------------------------
site {url=tv.sky.com|timezone=UTC|maxdays=7|cultureinfo=en-GB|charset=ISO-8859-1|episodesystem=onscreen|ratingsystem=UK}
*url_index{url|http://epgservices.sky.com/tvlistings-proxy/TVListingsProxy/tvlistings.json?channels=|channel|&dur=1440&detail=2&time=|urldate|&siteId=1}
url_index{url|http://epgservices.sky.com/tvlistings-proxy/TVListingsProxy/tvlistings.json}
url_index.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the index pages
urldate.format {datestring|yyyyMMddHHMM}
*
url_index.headers {method=POST}
url_index.headers {contenttype=application/x-www-form-urlencoded}
url_index.headers {accept=application/json, text/javascript, */*}
url_index.headers {postdata=channels='channel'&time='urldate'&dur=1440&detail=2&siteId=1}
*
index_showsplit.scrub {multi(exclude=first)|program":[|"eventid"|"movielocator"}
index_showsplit.modify {cleanup(removeduplicates=equal,100)}
*
index_variable_element.modify {set|'config_site_id'}
index_urlchannellogo.modify {addstart|http://tv.sky.com/logo/248/60/skychb'index_variable_element'.png}
*
index_start.scrub {single|"start"|:"|",|",}
index_title.scrub {single|"title"|:"|",|",}
*index_description.scrub {single|"shortDesc"|:"|",|",}
index_duration.scrub {single|"dur"|:"|",|",}
index_duration.modify {calculate(format=time)|60 / 60 /}
*
index_urlshow {url|http://tv.sky.com/programme/detail/|channelid":"||",}
index_urlshow.modify {addend|/'{single(include=first)|:"||",|",}'}
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the detail pages
*
scope.range{(showdetails)|end}
title.scrub {regex||
(.+?)
||}
description.scrub {regex||(.+?)
||}
category.scrub {regex||(.+?)||}
category.modify {replace|,|\|} * split in multi
showicon.scrub {regex|||(|)|}
ratingicon.scrub {single||src="|"|}
ratingicon.modify {addstart('ratingicon' not "")|http://tv.sky.com}
*
description.modify {remove|('productiondate')}
description.modify {remove(type=regex)|\(\d+\smins\)}
*
* episode scrubbed from description,most are in () but some are not
temp_1.modify {substring(type=regex)|'description' "\(([ES0-9].+?)\)"} season/episode or just episode in ()
description.modify {remove(temp_1 not "" type=regex)|\s\(S\d+.*?[Ee].*?\d+\)} *(Sxx..E..xx) *disable to leave season/episode info in description
description.modify {remove(temp_1 not "" type=regex)|\s\(E.*\d+\)} *(E..xx) *disable to leave season/episode info in description
description.modify {remove(temp_1 not "" type=regex)|\s\(\d+\/\d+\)} *(xx/xx) *disable to leave season/episode info in description
description.modify {remove(temp_1 not "" type=regex)|\s\(\d+\sof\s\d+\)} *(xx of xx) *disable to leave season/episode info in description
description.modify {cleanup(temp_1 not "")}
temp_1.modify {replace('temp_1' not "" type=regex)|,*\s*[Ee]p*\s*|E}
temp_1.modify {replace('temp_1' not "")|S0|S}
temp_1.modify {replace('temp_1' not "")|E0|E}
temp_1.modify {replace('temp_1' not "")|\sof\s|/}
temp_1.modify {addstart('temp_1' not "")|E} *check if we have only xx/xx
temp_1.modify {replace|ES|S} *season/episode present start with S
temp_1.modify {replace|EE|E} *no season/episode only start with E
episode.modify {addstart('temp_1' not "")|'temp_1'}
*
temp_2.modify {substring('episode' "" type=regex)|'description' "S\d+,*\s*E[Pp]\d+"} *Sxx, Epxx or SxxE.xx or Sxx E.xx no ()
description.modify {remove('temp_2' not "" type=regex)|S\d+,*\s*E[Pp]\d+} *disable to leave season/episode info in description
temp_2.modify {replace('temp_2' not "" type=regex)|,*\s*E[Pp]|E}
episode.modify {addstart('episode' "")|'temp_2'}
*
temp_3.scrub {regex||(Season\s*?\d{1,2})||} * the season from details tags
temp_3.modify {replace('temp_3' not "")|Season |S}
temp_4.scrub {regex||.+?(Episode\s*?\d{1,2})\s||} * the episode from details tags
temp_4.modify {replace('temp_4' not "")|Episode |E}
temp_4.modify {addstart('temp_3' not "")|'temp_3'}
episode.modify {addstart('episode' "")|'temp_4'}
*
*move eposide to temp to remove unwanted matches
temp_5.modify {addstart('episode' not "")|'episode'}
episode.modify {clear}
episode.modify {substring('episode' "" type=regex)|'temp_5' "S\d+E\d+\/\d+"} *SxxExx/xx
episode.modify {substring('episode' "" type=regex)|'temp_5' "S\d+E\d+"} *SxxExx
episode.modify {substring('episode' "" type=regex)|'temp_5' "E\d+\/\d+"} *Exx/xx
episode.modify {substring('episode' "" type=regex)|'temp_5' "E\d+"} *Exx
end_scope
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
url_index{url|http://epgservices.sky.com/tvlistings-proxy/TVListingsProxy/init.json}
index_site_channel.scrub {multi|title|:"|",|",}
index_site_id.scrub {multi|channelid|:"|",|",}
index_site_channel.modify {replace|\'|}
scope.range {(channellist)|end}
index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
end_scope
** @auto_xml_channel_end