**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: foxtel.com.au * @MinSWversion: * @Revision 4 - [25/07/2015] Francis De Paemeleere * - creation (new site API) * @Remarks: * @header_end **------------------------------------------------------------------------------------------------ site {url=foxtel.com.au|timezone=Australia/Melbourne|maxdays=14.1|cultureinfo=en-GB|charset=UTF-8|titlematchfactor=90|nopageoverlaps|episodesystem=xmltv_ns} urldate.format {daycounter|0} url_index{url|https://www.foxtel.com.au/webepg/ws/foxtel/channel/|channel|/events?movieHeight=110&tvShowHeight=90&startDate=##START_TIME##000&endDate=##END_TIME##000®ionId=12352} url_index.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the index pages scope.range {(urlindex)|end} index_variable_element.modify {calculate(format=date,unix)|'now'} * get the 'now' time url_index.modify {replace|##START_TIME##|'index_variable_element'} index_variable_element.modify {calculate(format=D0)|'config_timespan_days' 1 +} index_variable_element.modify {addend|:00:00} index_variable_element.modify {calculate(format=date,unix)|'urldate' 'index_variable_element' +} *config_timespan_days days after today url_index.modify {replace|##END_TIME##|'index_variable_element'} end_scope index_showsplit.scrub {regex||\"eventId\".*?}||} index_start.scrub {regex||^.*?"scheduledDate"\s*:\s*([+-]?\d*)||} index_duration.scrub {regex||^.*?"duration"\s*:\s*([+-]?\d*)||} index_title.scrub {regex||^.*?"programTitle"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} index_showicon.scrub {regex||^.*?"imageUrl"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} index_temp_1.scrub {regex||^.*?"eventId"\s*:\s*([+-]?\d*)||} index_start.modify {calculate(format=utctime)} index_duration.modify {calculate(format=time)|'index_duration' 60 /} * converted into hh:mm index_urlshow.modify {addstart(""not='index_temp_1')|https://www.foxtel.com.au/webepg/ws/foxtel/event/'index_temp_1'?movieHeight=213&tvShowHeight=213®ionId=12352} index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the detail pages temp_6.scrub {regex(||"event"(.*?)"alternateEpisodes"||} * this will contain the show info only title.modify {substring(type=regex)|'temp_6' "^.*?"programTitle"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} subtitle.modify {substring(type=regex)|'temp_6' "^.*?"episodeTitle"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} description.modify {substring(type=regex)|'temp_6' "^.*?"shortSynopsis"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} actor.modify {substring(type=regex)|'temp_6' "^.*?"actors"\s*:\s*\[(.*?)\]"} temp_4.modify {substring(type=regex)|'temp_6' "^.*?"genreCode"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} temp_5.modify {substring(type=regex)|'temp_6' "^.*?"subGenreCode"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} country.modify {substring(type=regex)|'temp_6' "^.*?"countryOfOrigin"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} temp_1.modify {substring(type=regex)|'temp_6' "^.*?"seriesNumber"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} temp_2.modify {substring(type=regex)|'temp_6' "^.*?"episodeNumber"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""} category.modify {addstart|genreCode='temp_4'\|subGenreCode='temp_5'} actor.modify {substring(type=regex)|"\"(.*?)\""} * temp_1 = season * temp_2 = episode temp_1.modify {calculate(not="" format=F0)|1 -} temp_2.modify {calculate(not="" format=F0)|1 -} episode.modify {clear} episode.modify {addend('temp_1' not="")|'temp_1'} episode.modify {addend|.} episode.modify {addend('temp_2' not="")|'temp_2'} episode.modify {addend|.} episode.modify {clear(="..")} *description.scrub {multi|} *director.scrub {single|} *actor.scrub {single(separator=", ")|} *presenter.scrub {single|} *producer.scrub {single|} *writer.scrub {single|} *composer.scrub {single|} *rating.scrub {multi|} *ratingicon.scrub {multi|} *category.scrub {single|} *productiondate.scrub {single|} *starrating.scrub {single|} *episode.scrub {single|} *subtitles.scrub {single|} *premiere.scrub {single|} *previousshown.scrub {single|} * * operations: ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|https://www.foxtel.com.au/webepg/ws/foxtel/channels?regionId=12352} *index_site_channel.scrub {regex||"name"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} *index_site_id.scrub {regex||"channelTag"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} *scope.range {(channellist)|end} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} *end_scope ** @auto_xml_channel_end