**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: axnspin.rs
* @MinSWversion: V1.1.1/52
* @Revision 0 - [03/09/2013] Francis De Paemeleere
* - creation
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
site {url=axnspin.rs|timezone=UTC+01:00|maxdays=30|cultureinfo=sr|charset=UTF-8|titlematchfactor=90|episodesystem=xmltv_ns}
url_index{url()|http://www.axnspin.rs/raspored/ajax/Serbia.AXN_SPiN/data/grid/|urldate|}
url_index.headers {customheader=Accept-Encoding=gzip} * to speedup the downloading of the index pages
urldate.format {datestring|yyyy/MM/dd}
index_showsplit.scrub {multi()|
} * 1 element should contain 7 days listing (from mon-sun)
scope.range {(splitindex)|end}
index_showsplit.modify {cleanup(removeduplicates=equal,100)} * now only get the unique pages. (because we have duplicate pages downloaded
* remove all the days, that are in the past.
* because the pages are always fixed from mon-sun.
* we must filter out the past days
index_temp_1.modify {calculate(type=element format=F0)|'index_showsplit' #} * how many elements? Used as loop counter.
index_temp_6.modify {addstart|'index_showsplit'} * copy original elemets in temp
index_showsplit.modify {clear} * to be refilled later
loop {('index_temp_1' > "0" max=200)|end}
index_temp_1.modify {calculate(format=F0)|1 -} * decrease the loop counter
index_temp_2.modify {substring(type=element)|'index_temp_6' 'index_temp_1' 1} * element to work on
index_temp_3.modify {substring(type=regex)|'index_temp_2' "^([0-9]\{4\}\-[0-9]\{2\}\-[0-9]\{2\})"} * get the date of this data
index_temp_3.modify {replace()|-|/} * make a readable date
index_temp_3.modify {calculate(format=date,unix)}
index_temp_4.modify {calculate(format=date,yyyy/MM/dd)|'now'}
index_temp_4.modify {calculate(format=date,unix)}
index_temp_3.modify {calculate(format=F0)|'index_temp_3' 'index_temp_4' -} * get the diff between now and the listing date
index_showsplit.modify {addstart('index_temp_3' >= "0")|##_##'index_temp_2'} * fill elements again , add a placeholder ##_## as separator, if the day is today, or in the future
end_loop
index_showsplit.modify {replace()|##_##|\|} * make multi
index_showsplit.modify {substring(type=regex)|
\s*(.*?)(?:\s*
){2}}
end_scope
index_start.scrub {regex()||^([0-9]{2}:[0-9]{2})||}
index_title.scrub {regex()||^[0-9]{2}:[0-9]{2}\s*(.*?)
||}
index_subtitle.scrub {single|