**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: rtvslo.si
* @MinSWversion: V0
* none
* @Revision 3 - [12/03/2016] Willy De Wilde
* use of api site - Italian version
* @Revision 2 - [10/02/2014] Jan van Straaten
* site changes
* @Revision 1 - [5/12/2011] Jan van Straaten
* none
* @Remarks:
* a Slovenian site
* @header_end
**------------------------------------------------------------------------------------------------
site {url=rtvslo.si|timezone=Europe/Ljubljana|maxdays=14|cultureinfo=sl-SI|charset=UTF-8|titlematchfactor=90}
url_index{url(debug)|http://api.rtvslo.si/spored/getProvys/|channel|/|urldate|}
*http://api.rtvslo.si/spored/getProvys/TVS1/2016-03-12
urldate.format {datestring|yyyy-MM-dd}
scope.range {(splitindex)|end}
* split into index pages
index_showsplit.scrub {regex()||.+?||}
index_showsplit.modify {replace()|\||\n\n\|}
* split in shows, keep the page separators
index_showsplit.modify {replace()|" format=F0)|100 +} * the amount to add to the sort number
* get the SORT_NUMBER
index_temp_2.modify {substring(type=regex)|'index_temp_1' "SORT_NUMBER=\"(\d+?)\""}
index_temp_3.modify {calculate(format=F0)|'index_temp_2' 'index_temp_9' +} * the new sort number
* reinsert sort number
index_temp_1.modify {replace(type=regex)|"SORT_NUMBER=\"(\d+?)\""|'index_temp_3'}
* build new index_showsplit
index_temp_8.modify {addend('index_temp_1' not ~ "")|'index_temp_1'####}
end_loop
index_temp_8.modify {replace|####|\|} * make multi
index_showsplit.modify {set()|'index_temp_8'}
* sort by integer value
index_showsplit.modify {sort(debug ascending,integer)}
sort_by.scrub {multi (target="index_showsplit")|SORT_NUMBER="||"}
end_scope
*
index_start.scrub {single|BILLEDSTART=|"|"|}
index_start.modify {substring(type=char)|'index_start' 0 5}
index_title.scrub {single()|||}
*index_temp_1.scrub {single()||||}
*index_temp_1.scrub {single()||||}
*index_title.modify {addstart ('index_title' = "") | ('index_temp_1')}
*index_subtitle.scrub {single()||||}
index_description.scrub {multi (exclude="*****")||||}
index_description.modify {cleanup(removeduplicates)}
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*index_site_channel.scrub {multi|Spored
|">||