**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: tv.nu * @MinSWversion: V2.1.6.7 * @Revision 1 - [20/03/2019] WGTeam * @Remarks: * @header_end **------------------------------------------------------------------------------------------------ site {url=tv.nu|timezone=UTC|maxdays=7|cultureinfo=sv-SE|charset=UTF-8|titlematchfactor=90|ratingsystem=imdb|allowlastdayoverflow} *site {episodesystem=xmltv_ns} site {episodesystem=onscreen} urldate.format {datestring|yyyy-MM-dd} url_index{url|https://web-api.tv.nu/channels/|channel|/schedule?date=|urldate|&fullDay=true} url_index.headers {customheader=X-Requested-With=XMLHttpRequest} index_urlchannellogo {url||"image":"||","broadcasts"} scope.range {(splitindex)|end} index_showsplit.scrub {multi|"broadcasts":[|{"type":||],"channelPlayProvider"} index_showsplit.modify{replace|\}\}\},\{|\}\|\{} index_showsplit.modify {cleanup(style=unidecode)} end_scope scope.range {(indexshowdetails)|end} index_start.scrub {regex||"startTime":(\d*)||} index_stop.scrub {regex||"endTime":(\d*)||} index_title.scrub {single|"title":"||",|",} global_temp_1.scrub {single|"description":"||",|",} index_showicon.scrub{url||"imageLandscape":"||",|",} index_rating.scrub{single|"imdb":{"rating":"||"|"} index_productiondate.scrub{single|"year":||,"} index_category.scrub{single(separator="","")|"genres":["||"],} index_temp_1.scrub{regex||^"([^",]*)","id":||} index_temp_2.scrub{regex||^".*?","id":"([^",]*)","slug||} index_temp_1.modify{addend|/'index_temp_2'} end_scope index_urlshow.modify {addstart('index_temp_1' not "")|https://web-api.tv.nu/details/'index_temp_1'} index_urlshow.modify{addend(not "")|?compact=true} index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the detail pages scope.range {(showdetails)|end} title.modify{addstart|'index_title'} subtitle.scrub {single|"title":"||",|",} description.scrub {single|"description":"||",|",} description.modify {addend('description' "")|'global_temp_1'} description.modify {replace|\\"|"} country.scrub{single(separator="","")|"countries":["||"]} producer.scrub {multi(max=2 includeblock="Exekutiv producent""Producent")|{"name":"||","|}} director.scrub {multi(max=2 includeblock="Regissör")|{"name":"||","|}} actor.scrub {multi(max=4 includeblock="Skådespelare""Gäststjärna")|{"name":"||","|}} writer.scrub {multi(max=2 includeblock="Författare")|{"name":"||","|}} presenter.scrub {multi(max=2 includeblock="Programledare")|{"name":"||","|}} temp_1.scrub{regex||^.*?"seasonNumber":([+-]?\d*)||} temp_1.modify{addstart(not "")|S} temp_2.scrub{regex(include=first)||^.*?"episodeNumber":([+-]?\d*)||} temp_2.modify{addstart(not "")|E} temp_3.scrub{regex||"totalEpisodes":(\d+),||} temp_3.modify{addstart(not "")|Et} episode.modify {addstart(pattern="S'S1'E'E1'Et'Et1'""S'S1'""E'E1'""Et'Et1'")|'temp_1''temp_2''temp_3'} end_scope subtitle.modify{remove( ~'index_title')|'subtitle'} temp_4.scrub {single|"tournament":"||",|",} subtitle.modify{addend(not "")| ('temp_4')} * * ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|https://web-api.tv.nu/channels} *index_site_id.scrub {regex||{"id":\d+,"name":".*?","slug":"([^"]*)","||} *index_site_channel.scrub {regex||{"id":\d+,"name":"([^"]*)","slug":"||} *scope.range {(channellist)|end} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} *end_scope ** @auto_xml_channel_end