Files
epg/siteini.pack/Serbia/axnspin.rs.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

84 lines
4.4 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @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()|<div id="schedule-row-|||<div class="schedule-grid-listings clearfix">} * 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)|<div class="title">\s*(.*?)(?:\s*</div>){2}}
end_scope
index_start.scrub {regex()||^([0-9]{2}:[0-9]{2})||}
index_title.scrub {regex()||^[0-9]{2}:[0-9]{2}\s*(.*?)</div>||}
index_subtitle.scrub {single|<div class="body"|>|</div>|</div>}
scope.range {(indexshowdetails)|end}
index_temp_6.modify {addstart()|'index_subtitle'}
index_subtitle.modify {substring(type=regex)|-(.*?)$}
index_temp_5.modify {substring(type=regex)|'index_temp_6' "([0-9]*[0-9]\{2\})\s*-.*?$"}
index_temp_6.modify {remove(type=regex)|([0-9]*[0-9]{2})\s*-.*?$}
index_temp_1.modify {substring(type=regex)|'index_temp_5' "([0-9]*)[0-9]\{2\}$"}
index_temp_2.modify {substring(type=regex)|'index_temp_5' "[0-9]*([0-9]\{2\})$"}
index_temp_2.modify {calculate(not="" format=F0)} * convert eg. 03 to 3
index_temp_6.modify {remove|Episode 'index_temp_2'}
index_subtitle.modify {remove|Episode 'index_temp_2'}
* index_temp_1 = season
* index_temp_2 = episode
index_temp_1.modify {calculate(not="" format=F0)|1 -}
index_temp_2.modify {calculate(not="" format=F0)|1 -}
index_episode.modify {clear}
index_episode.modify {addend('index_temp_1' not="")|'index_temp_1'}
index_episode.modify {addend()|.}
index_episode.modify {addend('index_temp_2' not="")|'index_temp_2'}
index_episode.modify {addend()|.}
index_episode.modify {clear(="..")}
index_description.modify {addstart()|'index_temp_6'}
end_scope
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*index_site_id.scrub {multi||||}
*index_site_id.modify {clear}
*index_site_channel.modify {addstart|AXN spin}
*index_site_id.modify {addstart|0}
** @auto_xml_channel_end