**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: tvtv.de
* @MinSWversion: V2.1.5
* @Revision 14 - [01/11/2018] Blackbear199
* - showsplit fix
* - add more regionals(channels.xml)
* @Revision 13 - [18/08/2018] Blackbear199
* - subtitle improvements
* @Revision 12 - [29/07/2018] Blackbear199
* - rewrite
* @Revision 11 - [31/12/2017] Blackbear199
* - showsplit change
* @Revision 10 - [24/08/2017] Blackbear199
* - add role argument,added multi episode info
* @Revision 9 - [19/02/2015] Francis De Paemeleere
* - add region selectable channels (+ revert to xmltv_ns version)
* @Revision 8 - [14/08/2014] Jan van Straaten
* - added removeduplicates from showsplit, customheaders, timezone
* @Revision 7 - [21/06/2013] Jan van Straaten
* - improved episode and subtitle
* @Revision 6 - [05/04/2013] Jan van Straaten
* - for three weeks of epg
* @Revision 5 - [02/03/2013] Jan van Straaten
* - creation
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
site {url=tvtv.de|timezone=Europe/Berlin|maxdays=28.1|cultureinfo=de-DE|charset=UTF-8|titlematchfactor=90}
site {subtitlestype=Gehörlose|ratingsystem=FSK|episodesystem=onscreen}
*
url_index{url|https://www.tvtv.de/sender/##channel##}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
*
scope.range{(urlindex)|end}
global_temp_1.modify {substring(type=regex)|'config_site_id' "^([^\/]*)\/?"}
url_index.modify {replace|##channel##|'global_temp_1'}
end_scope
*
index_urlchannellogo.modify {set|https://www.tvtv.de/images/senderlogos/'global_temp_1'.svg}
*
index_showsplit.scrub {multi(exclude="past hide")|
.+?<\/li>[^<]*<\/ul>[^<]*<\/li>"}
*check if its a regional channel,if so keep only its regional shows
global_temp_2.modify {substring(type=regex)|'config_site_id' "\/(.*)$"}
index_showsplit.modify {remove('global_temp_2' not "" type=regex)|"^.*?([^<]*'global_temp_2'[^<]*<\/li>).*$"}
index_showsplit.modify {remove(type=regex)|"^.*?[^<]*<\/li>.*$"}
*
index_temp_1.modify {substring(type=regex)|'index_showsplit' "(\d+:\d+)<\/li>"}
index_temp_1.modify {cleanup(removeduplicates span=3 link="index_showsplit")}
*index_showsplit.modify {(debug)}
end_scope
*
index_urlshow {url|||">||}
index_start.scrub {single||||}
index_title.scrub {single||">||}
*
title.scrub {single|||
|}
titleoriginal.scrub {multi(include=last)||||}
*subtitle.scrub {single(separator="," exclude="Folge""Staffel")||||} *german subtitle
subtitle.modify {substring(type=regex)|'titleoriginal' "[^:]*:\s(.*)$"} *english subtitle
description.scrub {multi||
|}
category.scrub {single(separator="," exclude=last)||||}
episode.scrub {single(pattern="Folge 'E1' von 'Et1' Staffel 'S1'""Folge 'E1' von 'Et1'""Folge 'E1'" separator="," include="Folge""Staffel")||||}
director.scrub {regex||\s*Regie[^<]*[^<]*(?:.*?)(?:(?:[^<]*]*>)?([^<]*)(?:)?[^<]*(?: \| | )(?:.*?))*
||}
producer.scrub {regex||\s*Produktion[^<]*[^<]*(?:.*?)(?:(?:[^<]*]*>)?([^<]*)(?:)?[^<]*(?: \| | )(?:.*?))*||}
actor.scrub {regex||\s*Darsteller[^<]*[^<]*(?:.*?)(?:(?:[^<]*]*>)?([^<]*(?:)?[^<]*)(?: \| | )(?:.*?))*||}
writer.scrub {regex||\s*Drehbuch[^<]*[^<]*(?:.*?)(?:(?:[^<]*]*>)?([^<]*)(?:)?[^<]*(?: \| | )(?:.*?))*||}
composer.scrub {regex||\s*Musik[^<]*[^<]*(?:.*?)(?:(?:[^<]*]*>)?([^<]*)(?:)?[^<]*(?: \| | )(?:.*?))*||}
presenter.scrub {regex||\s*(?:Mit\|Moderation)[^<]*[^<]*(?:.*?)(?:[^<]*]*>([^<]*)(?:)?[^<]*(?: \| | )(?:.*?))*||}
rating.scrub {multi(include="FSK:")||title="|"|
}
ratingicon.scrub {multi(include="fsk")||src="|"|
}
starrating.scrub {single(separator="/" include=first)|Redaktionsbewertung|||}
videoaspect.scrub {multi(include="Breitbild")||title="|"|
}
videoquality.scrub {multi(include="HDTV")||title="|"|
}
subtitles.scrub {multi(include="Gehörlose/-geschädigte")||title="|"|
}
premiere.scrub {multi(include="Neu")||title="|"|
}
country.scrub {single(separator="," include=last)||||}
showicon.scrub {single||src="|"|
}
*
titleoriginal.modify {clear(~ 'subtitle')}
titleoriginal.modify {clear(~ "Folge")}
titleoriginal.modify {addend(not"")|(lang=en)}
actor.modify {replace| (|(role=}
producer.modify {replace| / |\|}
producer.modify {replace|- und |\|}
episode.modify {remove(type=regex)|"\+\d+"}
episode.modify {replace|\|| }
rating.modify {remove|FSK: }
rating.modify {addend(not "")|+}
starrating.modify {calculate(not "" format=F1)}
videoaspect.modify {replace|Breitbild|16x9}
subtitles.modify {set(not "")|true}
premiere.modify {set(not "")|true}
productiondate.modify {substring('country' not "" type=regex)|'country' "\d{4}$"}
country.modify {remove('productiondate' not "")| 'productiondate'}
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*url_index {url|https://www.tvtv.de/programm}
*index_site_id.scrub {regex||]*>[^<]*(?:.*?))*||}
*index_site_channel.scrub {regex||]*>([^<]*)(?:.*?))*||}
*scope.range{(channellist)|end}
*index_site_id.modify {replace|\||#_#}
*index_site_channel.modify {replace|\||#_#}
*****wdr regionals
*index_site_id.modify {replace|#_#wdr#_#|#_#wdr#_#wdr/Deutschland#_#}
*index_site_channel.modify {replace|#_#WDR Fernsehen#_#|#_#WDR Fernsehen#_#WDR Deutschland#_#}
*****br regionals
*index_site_id.modify {replace|#_#ba3#_#|#_#ba3#_#ba3/Franken#_#ba3/Schwaben#_#}
*index_site_channel.modify {replace|#_#BR Fernsehen#_#|#_#BR Fernsehen#_#BR Franken#_#BR Schwaben#_#}
*****ndr regionals
*index_site_id.modify {replace|#_#no3#_#|#_#no3#_#no3/Deutschland#_#}
*index_site_channel.modify {replace|#_#NDR Fernsehen#_#|#_#NDR Fernsehen#_#NDR Deutschland#_#}
*****swr regionals
*index_site_id.modify {replace|#_#s3#_#|#_#s3#_#s3/Baden-Württemberg#_#s3/Rheinland-Pfalz#_#s3/Saarland#_#}
*index_site_channel.modify {replace|#_#SWR#_#|#_#SWR#_#SWR Baden-Württemberg#_#SWR Rheinland-Pfalz#_#SWR Saarland#_#}
*****mdr regionals
*index_site_id.modify {replace|#_#mdr#_#|#_#mdr#_#mdr/Satellit#_#}
*index_site_channel.modify {replace|#_#MDR#_#|#_#MDR#_#MDR Satellit#_#}
*****rbb regionals
*index_site_id.modify {replace|#_#rbb#_#|#_#rbb#_#rbb/Berlin#_#rbb/Brandenburg#_#}
*index_site_channel.modify {replace|#_#RBB Fernsehen#_#|#_#RBB Fernsehen#_#RBB Berlin#_#RBB Brandenburg#_#}
*****pr7m regionals
*index_site_id.modify {replace|#_#pr7m#_#|#_#pr7m#_#pr7m/Deutschland#_#}
*index_site_channel.modify {replace|#_#ProSieben Maxx#_#|#_#ProSieben Maxx#_#ProSieben Maxx Deutschland#_#}
*****kab regionals
*index_site_id.modify {replace|#_#kab#_#|#_#kab#_#kab/Deutschland#_#}
*index_site_channel.modify {replace|#_#Kabel 1#_#|#_#Kabel 1#_#Kabel 1 Deutschland#_#}
*****sixx regionals
*index_site_id.modify {replace|#_#sixx#_#|#_#sixx#_#sixx/Deutschland#_#}
*index_site_channel.modify {replace|#_#sixx#_#|#_#sixx#_#sixx Deutschland#_#}
*****sat1 regionals
*index_site_id.modify {replace|#_#sat1#_#|#_#sat1#_#sat1/Deutschland#_#}
*index_site_channel.modify {replace|#_#Sat.1#_#|#_#Sat.1#_#Sat.1 Deutschland#_#}
*****satg regionals
*index_site_id.modify {replace|#_#satg#_#|#_#satg#_#satg/Deutschland#_#}
*index_site_channel.modify {replace|#_#Sat.1 Gold#_#|#_#Sat.1 Gold#_#Sat.1 Gold Deutschland#_#}
*****pro7 regionals
*index_site_id.modify {replace|#_#pro7#_#|#_#pro7#_#pro7/Deutschland#_#}
*index_site_channel.modify {replace|#_#Pro Sieben#_#|#_#Pro Sieben#_#Pro Sieben Deutschland#_#}
*****rtl regionals
*index_site_id.modify {replace|#_#rtl#_#|#_#rtl#_#rtl/Deutschland#_#}
*index_site_channel.modify {replace|#_#RTL#_#|#_#RTL#_#RTL Deutschland#_#}
*****super regionals
*index_site_id.modify {replace|#_#super#_#|#_#super#_#super/Deutschland#_#}
*index_site_channel.modify {replace|#_#Super RTL#_#|#_#Super RTL#_#Super RTL Deutschland#_#}
*****orf2 regionals
*index_site_id.modify {replace|#_#orf2#_#|#_#orf2#_#orf2/Österreich#_#}
*index_site_channel.modify {replace|#_#ORF 2#_#|#_#ORF 2#_#ORF 2 Österreich#_#}
*****
*index_site_id.modify {replace|#_#|\|}
*index_site_channel.modify {replace|#_#|\|}
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
*end_scope
** @auto_xml_channel_end