**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: telsu.fi
* @MinSWversion:
* @Revision 1 - [18/02/2016]
* - creation
* @Remarks: this file is for the grid view in telsu.fi
* @header_end
**------------------------------------------------------------------------------------------------
site {url=telsu.fi|timezone=EET|maxdays=21|cultureinfo=fi-FI|charset=UTF-8|titlematchfactor=90|episodesystem=xmltv_ns|ratingsystem=MEKU|keepindexpage}
urldate.format {datestring|yyyyMMdd}
url_index{url|https://www.telsu.fi/|urldate|/kaikki}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
index_variable_element.modify {addend('index_variable_element' = "")|"'config_site_id'">}
index_showsplit.scrub {multi(includeblock='index_variable_element')|
}
index_title.scrub {regex||
(.+?)<.[bm]||}
index_title.modify {remove(type=regex)|.+<\/small>}
index_start.scrub {regex||(\d+\.\d+)||}
index_stop.scrub {regex||-?(.+?)||}
index_category.scrub {regex||class="(.+?)" rel="||}
index_category.modify {substring(type=regex)|c\d+}
* replace category ids with proper names
index_category.modify {replace|c1|Elokuvat}
index_category.modify {replace|c2|Urheilu}
index_category.modify {replace|c3|Uutiset}
index_category.modify {replace|c4|Lapsille}
index_category.modify {replace|c5|Kotimainen fiktio}
index_category.modify {replace|c6|Ulkomaiset sarjat}
index_category.modify {replace|c7|Viihde}
index_category.modify {replace|c8|Fakta}
index_category.modify {replace|c9|Muut}
index_urlshow.scrub {regex|| rel="(\d+)"||}
index_urlshow.modify {addstart|https://www.telsu.fi/x_dets?i=}
* temp_8 = all the info in the showdetails page
temp_8.scrub {regex||{.+}||}
temp_8.modify {cleanup(style=jsondecode)}
title.modify {substring(type=regex)|'temp_8' "title":"(.+?)","}
description.modify {substring(type=regex)|'temp_8' "text":"(.+?)","}
showicon.modify {substring(type=regex)|'temp_8' "pic":"(.+?)","}
showicon.modify{addstart('showicon' not = "")|https://www.telsu.fi/l/}
rating.modify {substring(type=regex)|'temp_8' "age":(.+?),"}
rating.modify {replace(type=regex)|^0$|S}
starrating.modify {substring(type=regex)|'temp_8' ,"rating":(.+?),"}
temp_8.modify {clear}
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*index_site_channel.scrub {regex||title="([^"]+)" alt||}
*index_site_id.scrub {regex||]+)">||}
*scope.range {(channellist)|end}
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
*end_scope
** @auto_xml_channel_end