Files
epg/siteini.pack/Spain/tunein.com.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

70 lines
3.8 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: tunein.com
* @MinSWversion: V0
* none
* @Revision 0 - [25/11/2012] Jan van Straaten
* none
* @Remarks:
* Spanish radio
* @header_end
**------------------------------------------------------------------------------------------------
site {url=tunein.com|timezone=UTC+00:00|maxdays=10|cultureinfo=es-ES|charset=utf-8|titlematchfactor=90|nopageoverlaps}
*
url_index{url(debug)|http://tunein.com/station/schedule/?stationId=|channel|&date=|urldate}
http://tunein.com/station/schedule/?stationId=78109&date=11/26/2012
urldate.format {datestring|MM/dd/yyyy}
*
* a rather complicated showsplit:
* some channels have no schedules on certain days
* the following adds dummy shows with "no schedules" as title on the days that have nothing in the index
* the first showsplit splits the indexpages in days:
index_showsplit.scrub {multi|<ul class="list-results alt">|||</ul>} * split in days
*
scope.range {(splitindex)|end}
index_showsplit.modify {replace|<li class="clearfix">|\|} split in shows and dayheaders, something like dssdssssddssdss
* index_variable_element contains the dummy show:
index_variable_element.modify {addstart|<div class="fl-l time"> 12am - 11:59pm </div> <div class="fl-l show_name"> <h3> ">No schedules</a></h3></div> </li>}
index_temp_1.modify {calculate(type=element format=F0)|'index_showsplit' #} * number of elements in showsplit s + d
index_temp_2.modify {addstart|'index_showsplit'} * copy showsplit to t2
index_temp_4.modify {calculate(format=F0)}
index_showsplit.modify {clear}
loop {('index_temp_1' > "1" max=500)|end}
index_temp_1.modify {calculate(format=F0)|1 -} * loop counter
index_temp_4.modify {calculate(format=F0)|1 +} * used to know if it's the last (= first in loop)
index_temp_6.modify {substring(type=element)|'index_temp_2' 'index_temp_1' 1} * show to inspect
index_temp_3.modify {calculate(format=F0)|"0" *} *t3 holds the test condition, set to 0
index_temp_3.modify {calculate('index_temp_6' ~ "<li class=\"head clearfix\">" format=F0)|1 +} *dayheader? increase with 1
*** if last is a dayheader, add a dummy
index_temp_3.modify {calculate('index_temp_4' "1" format=F0)|1 +}
index_showsplit.modify {addstart('index_temp_3' "2")|####'index_variable_element'} * add dummy
***
index_showsplit.modify {addstart('index_temp_3' "0")|####'index_temp_6'} * no dayheader, real show
index_temp_1.modify {calculate(format=F0)|1 -} * index next show
index_temp_6.modify {substring(type=element)|'index_temp_2' 'index_temp_1' 1} * next show to inspect
index_temp_3.modify {calculate('index_temp_6' ~ "<li class=\"head clearfix\">" format=F0)|1 +} *dayheader? if 2 subsequent headers
index_showsplit.modify {addstart('index_temp_3' > "1")|####'index_variable_element'} * add dummy if subsequent dayheaders (day without shows)
index_temp_1.modify {calculate(format=F0)|1 +} * move index back to actual show
end_loop
index_showsplit.modify {replace|####|\|} Make multi
end_scope.range
*
scope.range {(indexshowdetails)|end}
index_start.scrub {single(separator=" - " include=first)|<div class="fl-l time">||</div>|</div>}
index_stop.scrub {single(separator=" - " exclude=first)|<div class="fl-l time">||</div>|</div>}
index_title.scrub {single(separator="\">" include=last)|<div class="fl-l show_name">|<h3>|</h3>|</div>}
end_scope.range
*
index_title.modify {cleanup}
*channel list file:
* 16 primary stations:
*url_index {url|http://tunein.com/}
*index_site_channel.scrub {multi|<tr class="|<strong>|</strong>|</tr>}
*index_site_id.scrub {multi|<tr class="|-s|/"|<span class="img">}
*index_site_channel.modify {cleanup(removeduplicates=equal)}
*index_site_id.modify {cleanup(removeduplicates=equal)}