**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: dstv.com * @MinSWversion: * none * @Revision 6 - [24/03/2020] WGT * @Revision 5 - [04/12/2016] Blackbear199 * rewrite * @Revision 4 - [05/06/2013] Francis De Paemeleere * adding rating * totaly re-written description parsing * @Revision 3 - [04/06/2013] Francis De Paemeleere * small adjustments to 'new' site implementation * @Revision 2 - [07/03/2013] Francis De Paemeleere * small adjustments to 'new' site implementation * @Revision 1 - [20/11/2011] Jan van Straaten * completely new, due to site change * @Remarks: * set timezone= to you local timezone.if you dont know what to put use timezone=? and run webgrab.Look in your webgrab++.log.txt for a list of valid timezones. * @header_end **------------------------------------------------------------------------------------------------ site {url=dstv.com|timezone=America/Halifax|maxdays=13|cultureinfo=en|charset=UTF-8|titlematchfactor=90} site {ratingsystem=GB|episodesystem=onscreen|keepindexpage|loadcookie=hot_cookies.txt|retry=4} url_index{url|http://guide.dstv.com/api/gridview/page?&bouquetId=##bouquet_id##&genre=all&date=|urldate|} url_index.headers {customheader=Accept-Encoding=gzip,deflate} * urldate.format {datestring|yyyy-MM-dd} * scope.range{(urlindex)|end} index_temp_1.modify {substring(type=regex)|'config_site_id' "^([^#]*)##"} url_index.modify {replace|##bouquet_id##|'index_temp_1'} end_scope * index_variable_element.modify {substring(type=regex)|'config_site_id' "##(.*)$"} index_showsplit.scrub {multi(include="class='event-time'")|"'index_variable_element'":|
  • | "} * index_urlchannellogo {url|||>} * index_urlshow {url|http://guide.dstv.com/popup/||| style| style} index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * index_start.scrub {single|

    ||<|

    } index_title.scrub {single|

    ||

    |

    } * title.scrub {single|

    ||

    |} description.scrub {single|
    |

    |

    |
    } director.scrub {single(separator=")" include=last)|

    ||

    |

    } actor.scrub {single(separator="(" include=first)|

    ||

    |

    } rating.scrub {regex||\d{2}:\d{2}.*?\s(\w+)

    ||} productiondate.scrub {single|

    ||

    |

    } * scope.ramge{(showdetails)|end} actor.modify {remove(type=regex)|\.\s$} actor.modify {replace|, |\|} subtitle.modify {substring(type=regex)|'description' "\'S\d+/E\d+ - ([^\']*)\'\.\s"} subtitle.modify {remove(type=regex)|\d+/\d+} episode.modify {substring(pattern="S'S1'/E'E1'" type=regex)|'description' "\'(S\d+/E\d+)"} description.modify {remove(type=regex)|^\'[^\']*\'\.\s} end_scope * ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### COUNTRY CODE FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|http://guide.dstv.com/CountryLanguage?_=} *index_site_id.scrub {regex||data-country-code=\\"(.*?)\\" analytics-id=\\"eventCountrySelected\\" analytics-text=\\".*?\\"||} *index_site_channel.scrub {regex||data-country-code=\\".*?\\" analytics-id=\\"eventCountrySelected\\" analytics-text=\\"(.*?)\\"||} *index_site_channel.modify{cleanup(style=jsondecode)} ** @auto_xml_channel_end ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### COUNTRY BOUQUET ID FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|http://guide.dstv.com/api/bouquet?countryCode=|channel|&productId=&language=EN&_=} *index_site_id.scrub {regex||\{"Id":"(\w+-\w+-\w+-\w+-\w+)"||} *index_site_channel.scrub {multi|"Title":"||",|",} ** @auto_xml_channel_end ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|http://guide.dstv.com/api/channel/fetchChannelsByGenresInBouquet?bouquetId=|channel|&genre=all&_=} *index_variable_element.modify {set|'config_site_id'} *index_site_id.scrub {multi|"channelTag":"||",|",} *index_site_id.modify {addstart|'index_variable_element'##} *index_site_channel.scrub {multi|"channelName":"||",|",} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} ** @auto_xml_channel_end