**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: horizon.tv * @MinSWversion: V2.1.1 * @Revision 7 - [04/11/2017] DeBaschdi * @Revision 6 - [25/07/2017] Blackbear199 * - added lang attrubute for different countries * @Revision 5 - [24/03/2017] Blackbear199 * - episode fix * @Revision 4 - [17/01/2017] Blackbear199 * - fix for linux users using php script due to https issues * @Revision 3 - [24/08/2016] Blackbear199 * - combined all countries into single ini * - added italy * @Revision 2 - [07/07/2016] Blackbear199 * - changed api address to one that doesnt change * @Revision 1 - [19/06/2016] Blackbear199 * - api change,category small fix * @Revision 0 - [29/04/2016] Blackbear199 * - creation * @Remarks: * hozizon.tv all countries.Netherlands,Switzerland,France,Italy,Germany,Poland,Ireland,Czech Republic,Austria,Romania,Hungary,Slovakia * windows and linux users may need to use different url_index,index_urlshow,url_index(channell.xml creation).be sure to enable correct one.disable the other. * @header_end **------------------------------------------------------------------------------------------------ * site {url=horizon.tv|timezone=UTC|maxdays=7|cultureinfo=de-DE|charset=utf-8|titlematchfactor=90|episodesystem=onscreen} site {retry=4} * url_index{url|https://web-api.horizon.tv/oesp/api/##country##/web/programschedules/|urldate|/|subpage|} *mono > 5.0.0.1 *url_index{url|http://127.0.0.1/horizon_tv.php?country=##country##&date=|urldate|&subpage=|subpage|&reqtype=1} * linux/windows php url_index.headers {customheader=Accept-Encoding=gzip,deflate} url_index.headers {accept=application/json|contenttype=application/json} url_index.headers {customheader=Accept-Encoding=gzip,deflate} * urldate.format {datestring|yyyyMMdd} subpage.format{list|1|2|3|4} * scope.range{(urlindex)|end} index_variable_element.modify {substring(type=regex)|'config_site_id' "^(.*?)_"} url_index.modify {replace|##country##|'index_variable_element'} end_scope * global_temp_1.modify {substring(type=regex)|'config_site_id' "_(\d+)__"} index_urlchannellogo.modify {substring(type=regex)|'config_site_id' "__(.*?)$"} index_showsplit.scrub {multi|"o":"'global_temp_1'",|{|}|]}} index_showsplit.modify {cleanup(removeduplicates=equal,100)} * * lang configuration global_temp_2.modify {set|'index_variable_element'} global_temp_2.modify {replace|NL/nld|nl} global_temp_2.modify {replace|CH/deu|de} global_temp_2.modify {replace|CH/fra|fr} global_temp_2.modify {replace|CH/ita|it} global_temp_2.modify {replace|DE/deu|de} global_temp_2.modify {replace|PL/pol|pl} global_temp_2.modify {replace|IE/eng|en} global_temp_2.modify {replace|CZ/ces|cz} global_temp_2.modify {replace|AT/deu|de} global_temp_2.modify {replace|HU/hun|hu} * index_start.scrub {single|"s":||,|,} index_stop.scrub {single|"e":||,|,} index_title.scrub {single|"t":"||",|",} * index_urlshow {url|https://web-api.horizon.tv/oesp/api/'index_variable_element'/web/listings/|"i":"||"|"} *mono > 5.0.0.1 *index_urlshow {url|http://127.0.0.1/horizon_tv.php?country='index_variable_element'&reqtype=2&showid=|"i":"||"|"} * linux/windows php index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * index_title.modify {addend|(lang='global_temp_2')} * title.scrub {single|"title":"||",|",} subtitle.scrub {regex||"secondaryTitle":"(.*?)"[,\}]||} subtitle.modify {clear('title')} description.scrub {single|"longDescription":"||",|",} director.scrub {single(separator="\",\"")|"directors":["||"],|"],} actor.scrub {single(separator="\",\"")|"cast":["||"],|"],} * category.scrub {multi|"categories":[|"title":"|",|}]} category.scrub {single|"medium":"||",|",} category.modify {replace|TV|Series} category.modify {replace|/|\|} category.modify {cleanup(style=name)} category.modify {cleanup(removeduplicates=equal,100)} * temp_1.scrub {single|"seriesEpisodeNumber":"||"|"} temp_1.modify {clear(> "1000")} temp_1.modify {addstart(not "")|E} temp_2.scrub {single|"seriesNumber":"||"|"} temp_2.modify {clear(> "10000")} temp_2.modify {addstart(not "")|S} temp_1.modify {addstart('temp_2' not "")|'temp_2' } episode.modify {addstart('temp_1' not "" pattern="S'S1'E'E1'""S'S1'""E'E1'")|'temp_1'} * productiondate.scrub {single|"year":"||"|"} temp_3.modify {substring(type=regex)|'config_site_id' "^(\w{2})\/"} rating.scrub {single|"parentalRating":"||"|"} rating.modify {clear("0")} rating.modify {addend(notnull)|(system='temp_3')} * starrating.modify {substring(type=regex)|'description' "IMDb.*"} description.modify {replace|\|| } description.modify {remove|'starrating'} description.modify {cleanup(style=jsondecode)} starrating.modify {substring(type=regex)|"\d\.\d"} starrating.modify {addend(notnull)|(system=IMDb)} showicon.scrub {single|"tva-boxcover"|"url":"|"|}} * *title.modify {addend|(lang='global_temp_2')} *subtitle.modify {addend(notnull)|(lang='global_temp_2')} *description.modify {addend(notnull)|(lang='global_temp_2')} *category.modify {addend(notnull)|(lang='global_temp_2')} ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ * ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) * ** @auto_xml_channel_start *url_index {url|https://web-api.horizon.tv/oesp/api/|subpage|&personalised=false} *mono > 5.0.0.1 *url_index.modify {replace|_|/web/channels?sort=channelNumber&byLocationId=} *mono > 5.0.0.1 **url_index{url|http://127.0.0.1/horizon_tv.php?chxmldata=|subpage|&reqtype=3} * linux/windows php *subpage.format {list|NL/nld_24443942973|CH/deu_21656615412|CH/fra_21657127006|CH/ita_21657126954|DE/deu_97245734974|PL/pol_239100967286|IE/eng_6651943228|CZ/ces_667808295264|AT/deu_554823207312|RO/ron_552441895089|HU/hun_552442407296|SK/slk_604944423340} *index_site_id.scrub {|} *index_temp_9.modify {set|NL/nld\|CH/deu\|CH/fra\|CH/ita\|DE/deu\|PL/pol\|IE/eng\|CZ/ces\|AT/deu\|RO/ron\|HU/hun\|SK/slk} *index_temp_1.modify {set|0} *index_temp_8.scrub {multi|{"entryCount"|||} *loop{(each "index_temp_7" in 'index_temp_8')|end} *index_temp_2.modify {substring(type=element)|'index_temp_9' 'index_temp_1' 1} *index_temp_6.modify {substring(type=regex)|'index_temp_7' "\{\"station\":\{\"id\":\"(.*?subChannels)"} *index_temp_6.modify {replace(type=regex)|(\",\"countryCode\".*?150.*?\"url\":\")|__} *index_temp_6.modify {remove(type=regex)|.png(.*?subChannels)|__} *index_temp_6.modify {remove(type=regex)|(\",\"countryCode\".*?subChannels)|__} *index_temp_6.modify {addstart|'index_temp_2'_} *index_temp_6.modify {replace|\||##} *index_temp_5.modify {substring(type=regex)|'index_temp_7' "\{\"station\":\{\"id\":.*?\"title\":\"([^\"]*)\","} *index_temp_5.modify {replace|\||##} *index_temp_4.modify {addend|'index_temp_6'##} *index_temp_3.modify {addend|'index_temp_5'##} *index_temp_1.modify {calculate(format=F0)|1 +} *end_loop *index_site_id.modify {addstart|'index_temp_4'} *index_site_id.modify {replace|##|\|} *index_site_id.modify {remove(type=element)|-1 1} *index_site_channel.modify {addstart|'index_temp_3'} *index_site_channel.modify {replace|##|\|} *index_site_channel.modify {remove(type=element)|-1 1} *index_site_channel.modify {remove(type=regex)|[^\w\s]} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} ** @auto_xml_channel_end