**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: en.timefor.tv * @MinSWversion: V1.1.1/53 * @Revision 2 - [18/06/2014] Francis De Paemeleere * - fix season/episode error * @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: * @header_end **------------------------------------------------------------------------------------------------ site {url=se.timefor.tv|timezone=UTC+01:00|maxdays=14|cultureinfo=sv-SE|charset=UTF-8|titlematchfactor=90|episodesystem=onscreen} url_index{url|http://se.timefor.tv/listings/|channel|/|urldate|} urldate.format {datestring|yyyy-MM-dd} index_showsplit.scrub {multi||
} * "> and not because indexpage is showing progressbar for current show index_urlshow {url|http://se.timefor.tv||href="|" class="programsummary" |} index_date.scrub {single|defaultDate:"||", |} index_start.scrub {single|"time">|

|:

|

} index_title.scrub {single|programid="|">||} * get the channellogo: *example :config_site_id="tv4-sverige" index_variable_element.modify {addstart(scope=urlindex)|'config_site_id'} index_urlchannellogo.scrub {single|||</a} * this is a big logo * adding this line gets the small one: *index_urlchannellogo.modify {remove|_big} * ***************** Showdetails *************** title.scrub {single(includeblock=1)|||} titleoriginal.scrub {single(lang=xx)|Originaltitel :|">|

|} subtitle.scrub {single|Titel avsnitt:|">|

|} * if a real episode title is available temp_3.scrub {single(include=last)|class="epg"|"> - ||

} category.scrub {single(separator="/")|Genre:|">|

|} * finds genre eg. komedie, tv serier, etc. category.scrub {single(separator="/")|Typ:|">|

|} * finds more Typeinfo eg. Film, serie etc. productiondate.scrub {single|Från:|">|

|} * finds productionyear actor.scrub {multi(exclude="Regissör")|

Rollsättning

||

|} * finds actor list, HTML junk is removed with modify later director.scrub {multi(include="Regissör")|

Rollsättning

||

|} *temp_6.scrub {regex||Avsnitt:.*?>([^<]*sæson[^<]*)||} * extracts all episode info incl. sæson-info temp_6.scrub {single|Avsnitt:|||} * extracts all episode info incl. sæson-info scope.range {(showdetails)|end} actor.modify {remove(type=regex)|(

.*)} * remove any actor role (after the

) director.modify {remove(type=regex)|(
.*)} *subtitle.modify {addstart(="")|'temp_3'} temp_3.modify {remove(type=regex)|(\.)} description.modify {remove('temp_3' not="")|'temp_3'. } description.modify {addstart('temp_3' not="")|'temp_3'. } * add genre and date info to description category.modify {replace|/|\|} ***episode in xmltv_ns format*** temp_6.modify {cleanup(tags="<"">")} temp_1.modify {substring(type=regex)|'temp_6' "sæson\s*(\d*)\s*$"} temp_2.modify {substring(type=regex)|'temp_6' "^\s*(\d*)\s*[:]?"} temp_3.modify {clear} temp_4.modify {substring(type=regex)|'temp_6' "^\s*\d*\s*:\s*(\d*)\s*"} * 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(="..")} * xmltv_ns --> onscreen S010E02/3 * temp_1 = season * temp_2 = episode * temp_3 = number of seasons * temp_4 = number of episodes temp_1.modify {substring(type=regex)|'episode' "^(\d*)(?:/\d*)?\.\d*(?:/\d*)?\."} temp_2.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.(\d*)(?:/\d*)?\."} temp_3.modify {substring(type=regex)|'episode' "^\d*(?:/(\d*))?\.\d*(?:/\d*)?\."} temp_4.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.\d*(?:/(\d*))?\."} temp_1.modify {calculate(not="" format=D2)|1 +} * D2 format adds 0 if less than 10 to season temp_2.modify {calculate(not="" format=D2)|1 +} * D2 format adds 0 if less than 10 to episode temp_1.modify {addend('temp_3' not="")|/'temp_3'} temp_2.modify {addend('temp_4' not="")|/'temp_4'} episode.modify {clear} episode.modify {addend('temp_1' not="")|S'temp_1'} episode.modify {addend('temp_2' not="")|E'temp_2'} episode.modify {remove(type=regex)|^\s*} temp_1.modify {substring(type=regex)|'titleoriginal' ",\s*The$"} * check if the titleoriginal ends with ", The" titleoriginal.modify {remove('temp_1' not="" type=regex)|",\s*The$"} * if so, remove it titleoriginal.modify {addstart('temp_1' not="")|The } * and prepend "The " temp_1.modify {substring(type=regex)|'titleoriginal' ",\s*A$"} * check if the titleoriginal ends with ", A" titleoriginal.modify {remove('temp_1' not="" type=regex)|",\s*A$"} * if so, remove it titleoriginal.modify {addstart('temp_1' not="")|A } * and prepend "A " 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' "
"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)|
).*?

.*?)*
|>'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)|(.*?)

.*?)*} *index_site_id.modify {substring(type=regex)|)*} ** *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} *end_scope ** @auto_xml_channel_end