**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: dk.timefor.tv - generic.timefor.tv
* @MinSWversion: V1.1.1/52
* @Revision 4 - [21/11/2013] Francis De Paemeleere
* use generic xmltv_ns episode generation
* @Revision 3 - [20/08/2013] Francis De Paemeleere
* fix showdetail title error + minor fixes
* add automatic channel generation
* @Revision 2 - [25/10/2012] Jan van Straaten
* episode is follwing the xmltv_ns format >> season.episode.part
* @Revision 1 - [01/10/2012] Jesper Schumacher
* in episode : - is replaced with /
* @Remarks: base version taken from en.timefor.tv
* @header_end
**------------------------------------------------------------------------------------------------
site {url=dk.timefor.tv|timezone=UTC+01:00|maxdays=14|cultureinfo=da-DK|charset=UTF-8|titlematchfactor=90|episodesystem=xmltv_ns}
url_index{url()|http://dk.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://dk.timefor.tv||href="|" class="programsummary" |}
index_date.scrub {single()|defaultDate:"||", |}
index_start.scrub {single()|"time">| |: |}
*index_start.modify {calculate(format=utctime)} * in case of the 2 hour offset
index_title.scrub {single()|programid="|">||}
index_temp_1.scrub {single()| | | |}
index_title.modify {addstart ('index_title' = "") | ('index_temp_1')}
**************** Showdetails ***************
title.scrub {single(includeblock=1)| ||}
titleoriginal.scrub {single(lang=en)|Original titel:|">|| | }
subtitle.scrub {single()|Episode titel:|">||} * if a real episode title is available
temp_5.scrub {single (include=last)|class="epg"|"> - ||}
category.scrub {single(separator="/")|Genre:|">||} * finds genre eg. komedie, tv serier, etc.
temp_1.scrub {single()|Episode:|sæson ||} * finds the "sæson" number, if it is a sæson
category.scrub {single(separator="/")|Type:|">||} * finds more Typeinfo eg. Film, serie etc.
productiondate.scrub {single()|Fra:|">||} * finds productionyear
temp_2.scrub {single()|Episode:|">||} * extracts all episode info incl. sæson-info
actor.scrub {multi()|
Medvirkende
|||
} * finds actor list, HTML junk is removed with modify later
index_variable_element.modify {clear}
index_variable_element.modify {addstart()|'config_site_id'}
scope.range {(showdetails)|end}
subtitle.modify {addstart(="")|'temp_5'} * add, if no real episode title was found
category.modify {replace|/|\|}
actor.modify {remove(type=regex)|(
.*)} * remove any actor role (after the
)
***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(="..")}
episode.modify {addend('temp_2' not="")|'temp_2'}
episode.modify {addstart('episode' not="")|E}
episode.modify {replace| sæson |/S}
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://dk.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
*For classical credits - remove the next lines
category.modify {cleanup(removeduplicates)}
category.modify {cleanup}
description.modify {addend('director' not "" separator=", ")|\n'director'}
description.modify {addend('actor' not "" separator=", ")|\n'actor'}
actor.modify {remove|'actor'}
director.modify {remove|'director'}
subtitle.modify {addstart ('titleoriginal' not "") | ('titleoriginal')}
subtitle.modify {addend ('episode' not "") | ('episode')}
subtitle.modify {addend ('productiondate' not "") | ('productiondate')}
subtitle.modify {addstart ('category' not "") |['category'] }
subtitle.modify {addend ('rating' > "1") | ['rating'] }
rating.modify {clear}
episode.modify {clear}
category.modify {clear}
productiondate.modify {clear}
titleoriginal.modify {clear}
writer.modify {clear}
producer.modify {clear}
composer.modify {clear}
starrating.modify {clear}
rating.modify {clear}
presenter.modify {clear}
starrating.modify {clear}
videoquality.modify {clear}
videoaspect.modify {clear}
index_category.modify {cleanup(removeduplicates)}
index_category.modify {cleanup}
index_description.modify {addend ('index_director' not "" separator=", " )|\n'index_director'}
index_description.modify {addend ('index_actor' not "" separator=", " )|\n'index_actor'}
index_description.modify {addend ('index_presenter' not "" separator=", " )|\n'index_presenter'}
index_subtitle.modify {addstart ('index_titleoriginal' not "") | ('index_titleoriginal')}
index_subtitle.modify {addend ('index_episode' not "") | ('index_episode')}
index_subtitle.modify {addend ('index_productiondate' not "") | ('index_productiondate')}
index_subtitle.modify {addstart ('index_category' not "") |['index_category'] }
index_subtitle.modify {addend ('index_rating' > "1") | ['index_rating'] }
index_writer.modify {clear}
index_rating.modify {clear}
index_productiondate.modify {clear}
index_titleoriginal.modify {clear}
index_actor.modify {clear}
index_director.modify {clear}
index_presenter.modify {clear}
index_episode.modify {clear}
index_category.modify {clear}
index_videoquality.modify {clear}