**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: ziggo.nl * @MinSWversion:1.1.1/52 * @Revision 1 - [24/12/2013] Jan van Straaten * - added show details * @Revision 0 - [20/06/2013] Francis De Paemeleere * - creation * @Remarks: * - currently only works default channels! So not all channels are supported * @header_end **------------------------------------------------------------------------------------------------ * site {url=ziggo.nl|timezone=UTC+01:00|maxdays=7|cultureinfo=nl-NL|charset=UTF-8|titlematchfactor=90} site {loadcookie=ziggo.nl_cookie.txt} url_index{url|https://www.ziggogids.nl/nl/|urldate|T|subpage|} urldate.format {datestring|yyyy-MM-dd} subpage.format {list|0400|1300|2200} index_showsplit.scrub {multi(exclude="gids-row-timeslot")|class="gids-item-row"|||} index_variable_element.scrub {multi|class="gids-row-channellogo"|title="|"|>} * contains all the channel names on the index page * scope.range {(splitindex)|end} * select only the show rows we are interested in index_temp_6.modify {addstart|'config_site_id'} * search the position of the channel row we are interested in index_temp_2.modify {addstart|'index_showsplit'} * copy index_showsplit in t2 index_temp_1.modify {calculate(type=element format=F0)|'index_variable_element' #} * number of elements loop {('index_temp_1' > "0" max=5000)|end} index_temp_1.modify {calculate(format=F0)|1 -} * loop counter index_temp_3.modify {substring(type=element)|'index_variable_element' 'index_temp_1' 1} * show to inspect (channel name) index_temp_4.modify {clear('index_temp_3' == 'index_temp_6')} index_temp_4.modify {addstart('index_temp_3' == 'index_temp_6')|'index_temp_1'} * save the index of the channels if it is the one we are looking for end_loop index_showsplit.modify {substring(type=element)|'index_showsplit' 'index_temp_4' 1/20} * select the multiple rows from all the subpages (3 pages/day) index_showsplit.modify {replace|class="gids-row-item"|\|} * split the rows into separate shows * at this point the rubbish info in front of every first show of a subpage, should be removed * we do that by selecting the valid ones index_showsplit.modify {select()|"popup-id=" ~} * next we remove the duplicates (the last of a subpage and the first of the next subpage are the same show and more or less equal) index_temp_1.modify {substring(type=regex)|'index_showsplit' "(.*?)style="} * the element that contains the exact duplicate string index_temp_1.modify {cleanup(removeduplicates link="index_showsplit")} end_scope * index_title.scrub {single|"gids-row-item-title"|>|<|<} index_start.scrub {single|"gids-row-item-time"|>|<|<} * index_urlshow {url()|https://www.ziggogids.nl/module/ajax/nl/program_popinfo/?typefav=false&progid=|popup-id="||"|} title.scrub {single|

||

|} description.scrub {single|
||
|} rating.scrub {multi|
|title="Kijkwijzer |"/>|
} category.scrub {single(separator="," exclude=":")|
||
|} * * the following lines extract and remove credits and productiondate from the description * subtitle.modify {substring(type=regex)|'description' ".+Afl\.:(.*?)\. "} description.modify {remove('subtitle' not "")|Afl.:'subtitle'.} presenter.modify {substring(type=regex)|'description' "Presentatie: (.*? .*?)\."} description.modify {remove('presenter' not "")|Presentatie: 'presenter'.} presenter.modify {replace| en |\|} * make multi presenter.modify {replace|, |\|} * make multi actor.modify {substring(type=regex)|'description' "met (.*?) en anderen"} description.modify {remove('actor' not "")| met 'actor' en anderen} actor.modify {replace|, |\|} * make multi director.modify {substring(type=regex)|'description' " van regisseur (.*?)\. "} * single director description.modify {remove('director' not "")| van regisseur 'director'} director.modify {substring(type=regex)|'description' " van regisseurs (.*?)\. "} * multiple directors description.modify {remove('director' not "")| van regisseurs 'director'} director.modify {replace| en |\|} * make multi director.modify {replace|, |\|} * make multi description.modify {remove(type=regex)|'description' "( Kijkwijzer indicatie: .+)"} productiondate.modify {calculate(format=productiondate)|'description'} description.modify {remove('productiondate' not "")| uit 'productiondate'} * ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *** this version will get all the available channel of the site **url_index{url|https://www.ziggogids.nl/nl/zenders} **index_site_channel.scrub {multi|class="channel_selection"||} **index_site_id.scrub {multi|class="channel_selection"||} ***index_site_id.scrub {multi|class="channel_selection"|value="|"|} * the site number, but it is not used in the index page ** this version will only get the channels that are visible on the index pages (default implementation) *index_site_channel.scrub {multi|class="gids-row-channellogo" title="||"|"} *index_site_id.scrub {multi|class="gids-row-channellogo" title="||"|"} *scope.range {(channellist)|end} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} *end_scope ** @auto_xml_channel_end