Files
epg/siteini.pack/Sweden/se.timefor.tv.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

116 lines
6.5 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: en.timefor.tv
* @MinSWversion: V1.1.1/55.27
* @Revision 4 - [10/11/2015] Francis De Paemeleere
* Fix Unix times for special channels. Get the last 10 numbers (prefix numbers are not always the same length)
* @Revision 3 - [28/10/2015] Jan van Straaten
* Unix start time including date, timezone UTC
* @Revision 2 - [02/03/2014] Francis De Paemeleere
* add show icon
* remove duplicate shows
* sync to base version
* @Revision 1 - [04/12/2013] Jan van Straaten
* - added channellogo
* @Revision 0 - [24/11/2013] Jan van Straaten
* - Swedisch variant of en.timefor.tv ; based on rev 3
* @Remarks: base version taken from en.timefor.tv
* @header_end
**------------------------------------------------------------------------------------------------
site {url=se.timefor.tv|timezone=UTC|maxdays=14|cultureinfo=sv-SE|charset=UTF-8|titlematchfactor=90|episodesystem=xmltv_ns}
url_index{url|http://se.timefor.tv/listings/|channel|/|urldate|}
url_index.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the index pages
urldate.format {datestring|yyyy-MM-dd}
index_showsplit.scrub {multi|<table class="block epg|<tr|"></td>|</table>} * "></td> and not </tr> because indexpage is showing progressbar for current show
scope.range {(splitindex)|end}
index_showsplit.modify {cleanup(removeduplicates=equal span=1)}
end_scope
index_urlshow {url|http://se.timefor.tv|<td class="title">|href="|" class="programsummary" |</a>}
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the detail pages
index_start.scrub {regex||<a href="/i/\d*(\d{10})-||} * Unix time
index_title.scrub {single|programid="|">|</a>|</a>}
index_start.modify {calculate(format=utctime)}
* get the channellogo:
*example :config_site_id="tv4-sverige"
index_variable_element.modify {clear}
index_variable_element.modify {addstart(scope=urlindex)|'config_site_id'}
index_urlchannellogo.scrub {single|<a href="/tv-tabla/'index_variable_element'">|<img src="|" alt=|</a>} * this is a big logo
* adding this line gets the small one:
*index_urlchannellogo.modify {remove|_big}
*
**************** Showdetails ***************
title.scrub {single(includeblock=1)|<h2|>|</h2>|</h2>}
titleoriginal.scrub {single(lang=xx)|Originaltitel :|">|</p>|</td></tr>}
subtitle.scrub {single|Titel avsnitt:|">|</p>|</td></tr>} * if a real episode title is available
temp_5.scrub {single(include=last)|class="epg"|"> - |</span>|</p><div} * will be used if no episode title is available
description.scrub {single(separator="Läs mer på " include=first)|<meta name="Description" content="|||">}
category.scrub {single(separator="/")|Genre:|">|</p>|</td></tr>} * finds genre eg. komedie, tv serier, etc.
temp_1.scrub {single|Episode:</strong></p>|sæson |</p></td></tr>|</tr>} * finds the "sæson" number, if it is a sæson
category.scrub {single(separator="/")|Typ:|">|</p>|</td></tr>} * finds more Typeinfo eg. Film, serie etc.
productiondate.scrub {single|Från:|">|</p>|</td></tr>} * finds productionyear
temp_2.scrub {single|Avsnitt:|">|</p>|</td></tr>} * extracts all episode info incl. sæson-info
actor.scrub {multi|<h3>Rollsättning </h3>|<strong>|</p>|</table>} * finds actor list, HTML junk is removed with modify later
showicon.scrub {regex||<img [^>]*src=\"([^\"]*)\"[^>]* id=\"pictureHolder\"[^>]*>||}
scope.range {(showdetails)|end}
director.modify {substring(type=regex)|'actor' "^.*<br>\s*Regissör\s*$"}
actor.modify {remove(type=regex)|'actor' "^.*<br>\s*Regissör\s*$"} * remove all non actors
actor.modify {remove(type=regex)|(</strong><br>.*)} * remove any actor role (after the </strong><br>)
director.modify {remove(type=regex)|(</strong><br>.*)}
***episode in xmltv_ns format***
temp_2.modify {remove|sæson 'temp_1'} * removes "sæson" and number in episode
temp_2.modify {remove| }
temp_2.modify {replace|:|\|} * replace : with | (= make multi)
temp_4.modify {substring(type=element)|'temp_2' 1 1} * is the number of episodes
temp_2.modify {substring(type=element)|0 1} * is the episode number
temp_3.modify {clear}
* temp_1 = season
* temp_2 = episode
* temp_3 = number of seasons
* temp_4 = number of episodes
temp_1.modify {calculate(not="" format=F0)|1 -}
temp_2.modify {calculate(not="" format=F0)|1 -}
episode.modify {clear}
episode.modify {addend('temp_1' not="")|'temp_1'}
episode.modify {addend('temp_3' not="")|/'temp_3'}
episode.modify {addend|.}
episode.modify {addend('temp_2' not="")|'temp_2'}
episode.modify {addend('temp_4' not="")|/'temp_4'}
episode.modify {addend|.}
episode.modify {clear(="..")}
subtitle.modify {addstart(="")|'temp_5'} * add, if no real episode title was found
category.modify {replace|/|\|}
end_scope
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*subpage.format {list|ee|lv|lt|nl|be|dk|uk|fi|fr|it|no|pl|ru|sw|es|se|cz|tr|de|at}
*url_index{url|http://en.timefor.tv/ajax/channel_list.php?language=|subpage|}
*index_site_id.scrub {multi||||}
*scope.range {(channellist)|end}
** now change the channel names according to the country groups (because there can be duplicate channel names between diff. country groups!)
** find all the country groups
*index_temp_1.modify {substring(type=regex)|'index_site_id' "<div id=\"channels(.*?)\""}
*index_temp_1.modify {cleanup(removeduplicates=equal,100)}
*index_temp_5.modify {calculate(type=element format=F0)|'index_temp_1' #} * how many elements? Used as loop counter.
*loop {('index_temp_5' > "0" max=50)|end}
*index_temp_5.modify {calculate(format=F0)|1 -} * decrease the loop counter
*index_temp_2.modify {substring(type=element)|'index_temp_1' 'index_temp_5' 1} * element to work on
*index_site_id.modify {replace(type=regex)|<div id="channels'index_temp_2'".*?<ul.*?(?:<li.*?<p.*?(>).*?</p>.*?</li>)*</ul></div>|>'index_temp_2' }
*end_loop
*index_site_channel.modify {addstart|'index_site_id'}
** now get id and channel name
*index_site_channel.modify {substring(type=regex)|<ul.*?(?:<li.*?<p.*?>(.*?)</p>.*?</li>)*</ul>}
*index_site_id.modify {substring(type=regex)|<ul.*?(?:<li.*?onclick="document\.location\.href=\'/listings/(.*?)\'.*?</li>)*</ul>}
**
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
*end_scope
** @auto_xml_channel_end