**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: programtv.onet.pl
* @MinSWversion: V2.1
* @Revision 2 - [19/01/2020] Mr Groch
* - Fixed country info seperated list in description
* - Fixed category dividing
* - Refined rating system
* - Refined star rating
* - Changed max days to 12
* @Revision 1 - [05/09/2018] Mr Groch
* - Added show info in desc header as option (better than using REX, because of country info), uncomment after "* show info in description header" to enable
* @Revision 0 - [29/03/2016] Blackbear199
* - creation
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
site {url=programtv.onet.pl|timezone=Europe/Warsaw|maxdays=12|cultureinfo=pl-PL|charset=UTF-8|titlematchfactor=90}
site {ratingsystem=PL}
*
site {episodesystem=onscreen} *Enable for Onscreen Episode System
*site {episodesystem=xmltv_ns} *Enable for xmltv_ns Episode System
*
url_index{url|https://programtv.onet.pl|channel||urldate|}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
urldate.format {list||?dzien=1|?dzien=2|?dzien=3|?dzien=4|?dzien=5|?dzien=6|?dzien=7|?dzien=8|?dzien=9|?dzien=10|?dzien=11|?dzien=12}
*
index_showsplit.scrub {multi|
|
|">}
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate}
*
index_date.scrub {single(force pattern="yyyy-MM-dd")||||}
index_start.scrub {single||||}
index_title.scrub {single||||||}
*index_description.scrub {single|||
|} *index page
index_episode.modify {substring(type=regex)|'index_title' "\s*(\d*, odc.\s\d*\/*\d*)"}
index_urlchannellogo {url(include=first)|http:|||||}
*titleoriginal.scrub {single|||
|}
description.scrub {single|||
|} * showdetail page
director.scrub {single(separator=",")||||}
presenter.scrub {single(separator=",")||||}
*
temp_1.scrub {single||||}
temp_1.modify {remove(type=regex)|\(.+?\)}
actor.modify {substring(type=regex)|'temp_1' "(?:,?([^,]*))*"}
*
writer.scrub {single(separator=",")||||}
starrating.scrub {multi|Ocena|||">}
starrating.modify {addend('starrating' not"")|/5}
rating.scrub {single||">}
rating.modify {addend('rating' not"")|+}
productiondate.scrub {single|"datePublished": "||"|"}
country.scrub {single|"countryOfOrigin": "||"|"}
episode.modify {substring(type=regex)|'title' "\s*(\d*, odc.\s\d*\/*\d*)"}
showicon.scrub {single|"thumbnailUrl": "||"|"}
*
index_title.modify {remove|'index_episode'}
title.modify {remove|'episode'}
index_category.modify {replace|-| }
index_category.modify {cleanup(style=name)}
episode.modify {replace| odc. | E}
episode.modify {remove|,}
episode.modify {addstart('episode' not "")|S}
episode.modify {replace|S E|E}
* show info in description header
*temp_2.modify {addstart('starrating' not"")|##'starrating'}
*temp_2.modify {addstart('rating' not"")|##'rating'}
*temp_2.modify {addstart('productiondate' not"")|##'productiondate'}
*temp_2.modify {addstart(separator="/" 'country' not"")|##'country'}
*temp_2.modify {replace()|##| ¤ }
*description.modify {addstart('temp_2' not"")|'temp_2'\n}
*
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*url_index{url|https://programtv.onet.pl/stacje}
*index_site_channel.scrub {multi| }
*index_site_id.scrub {multi|