127 lines
7.1 KiB
INI
Executable File
127 lines
7.1 KiB
INI
Executable File
**------------------------------------------------------------------------------------------------
|
||
* @header_start
|
||
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
|
||
* @Site: dagenstv.com
|
||
* @MinSWversion: V1.1.1/55.27
|
||
* none
|
||
* @Revision 6 - [30/10/2015] Jan van Straaten
|
||
* now based on rev 8 of dagenstv.com.ini
|
||
* @Revision 5 - [09/11/2012] Jan van Straaten
|
||
* removes the second show having the same start time
|
||
* @Revision 4 - []
|
||
* replaces #x20 (non breaking space) in site_channel with #x20 (space) /added nopageoverlap/added index_stop
|
||
* @Revision 3 - []
|
||
* fix in episode (removes faulty values longer than 4 words)
|
||
* @Revision 2 - []
|
||
* director multi value, director remove [....]
|
||
* @Revision 1 - []
|
||
* some small corrections in the xmltv_ns episode composition
|
||
* @Remarks:
|
||
* version that converts the episode into the xmltv_ns format8
|
||
* This site is index-only with a lot of details in it
|
||
* @header_end
|
||
**------------------------------------------------------------------------------------------------
|
||
|
||
site {url=dagenstv.com|timezone=Europe/Stockholm|maxdays=12|cultureinfo=sv-SE|charset=ISO-8859-1|titlematchfactor=90|nopageoverlaps|episodesystem=xmltv_ns}
|
||
*
|
||
url_index{url()|http://www.dagenstv.com/se/chart/?cha=|channel|&dat=|urldate}
|
||
urldate.format {datestring|yyyy-MM-dd}
|
||
index_showsplit.scrub {multi|<!-- Program -->|<a name=|<!-- Stop|<!-- Slut Content-tabell -->}
|
||
*
|
||
index_date.scrub {single(separator=", "" !??! " include=2)|<head>|<title>|</title>|<meta name="}
|
||
index_start.scrub {single(separator="(" include=first)|<div class="tbl_lrg_event_time|>|</div|</div}
|
||
index_stop.scrub {single(separator="(" exclude=first)|<div class="tbl_lrg_event_time|>|</div|</div}
|
||
index_title.scrub {single|<div class="tbl_lrg_event_name|>|<|</div>}
|
||
index_description.scrub {single(separator="[" include=first)|<div class="tbl_lrg_event_description|>|<|</div>}
|
||
index_actor.scrub {single(separator=", ""[")|<div class="tbl_lrg_event_description|Skådespelare:|.|</div>}
|
||
index_temp_1.scrub {single|<div class="tbl_lrg_event_description|Skådespelare:|.|</div>} * used to remove actors from description
|
||
index_director.scrub {single(separator="Skådespelare""[" include=first)|<div class="tbl_lrg_event_description|Regissör:|<|</div>}
|
||
index_presenter.scrub {single(separator="Kommentator""[" include=first)|<div class="tbl_lrg_event_description|Expertkommentator:|<|</div>}
|
||
index_presenter.scrub {single|<div class="tbl_lrg_event_description|Kommentator:|<|</div>}
|
||
index_presenter.scrub {single(separator=".""[" include=first)|<div class="tbl_lrg_event_description|presenteras av |<|</div>}
|
||
index_episode.scrub {single(separator="." include="Säsong ""Del ")|<div class="tbl_lrg_event_description|>|<|</div>}
|
||
index_productiondate.scrub {single|<div class="tbl_lrg_event_description|Producerat år|.|</div>}
|
||
*
|
||
* enable the following lines to create a channel file
|
||
*index_site_channel.scrub {multi|kanal...</option>|">|</option>|</form>}
|
||
*index_site_id.scrub {multi|kanal...</option>|<option value="|">|</form>}
|
||
*index_site_channel.modify {replace| | }
|
||
*
|
||
* operations:
|
||
scope.range {(indexshowdetails)|end}
|
||
index_director.modify {cleanup}
|
||
* episode filter: must start with Del or Säsong
|
||
index_episode.modify {cleanup}
|
||
index_temp_1.modify {calculate(type=element format=F0)|'index_episode' #}
|
||
loop {('index_temp_1' > "0")|end}
|
||
index_temp_1.modify {calculate(format=F0)|1 -}
|
||
index_temp_2.modify {substring(type=element)|'index_episode' 'index_temp_1' 1} *
|
||
index_temp_2.modify {substring(type=word)|0 1} * first word
|
||
index_temp_3.modify {clear} * reset
|
||
index_temp_3.modify {addstart('index_temp_2' "Del")|!OK!!} * condition start with Del
|
||
index_temp_3.modify {addstart('index_temp_2' "Säsong")|!OK!!} * condition start with Säsong
|
||
index_episode.modify {remove('index_temp_3' not "!OK!!" type=element)|'index_episode' 'index_temp_1' 1} *remove if !start with Del | Säsong
|
||
end_loop
|
||
*
|
||
index_stop.modify {remove|)}
|
||
*
|
||
* the condition when two shows with same start time , we remove the last:
|
||
index_temp_1.modify {addstart('index_start' = 'previous_start')|remove}
|
||
index_start.modify {clear('index_temp_1' ~ "remove")}
|
||
index_stop.modify {clear('index_temp_1' ~ "remove")}
|
||
*
|
||
index_episode.modify {replace|\||. } * make single
|
||
index_description.modify {remove('index_episode' not "")|'index_episode'.}
|
||
index_description.modify {remove|Producerat år 'index_productiondate'.}
|
||
index_director.modify {cleanup}
|
||
index_description.modify {remove|Regissör: 'index_director'}
|
||
index_description.modify {remove|Skådespelare: 'index_temp_1'.}
|
||
index_description.modify {remove|Expertkommentator: '{single(separator="Kommentator"" ""[" include=first)|<div class="tbl_lrg_event_description|Expertkommentator:|<|</div>}'}
|
||
index_description.modify {remove|Kommentator: '{single|<div class="tbl_lrg_event_description|Kommentator:|<|</div>}'}
|
||
index_description.modify {remove|presenteras av '{single(separator="." include=first)|<div class="tbl_lrg_event_description|presenteras av |<|</div>}'}
|
||
index_description.modify {cleanup}
|
||
index_description.modify {addstart(null)|inga Detaljer}
|
||
index_episode.modify {cleanup}
|
||
index_director.modify {remove|.}
|
||
index_director.modify {addend(notnull)|xyz}
|
||
index_director.modify {remove|, xyz}
|
||
index_director.modify {remove|xyz}
|
||
* remove [....] from director
|
||
index_temp_1.modify {calculate(type=char format=F0)|'index_director' "[" -@}
|
||
index_director.modify {remove('index_temp_1' > "0" type=char)|'index_director' 'index_temp_1'}
|
||
index_director.modify {replace|, |\|} * make multi value
|
||
index_presenter.modify {remove|.}
|
||
index_presenter.modify {remove|,}
|
||
*
|
||
* optional:
|
||
** Add episode to description
|
||
*index_description.modify {addend('index_episode' not "")|\nEpisode: 'index_episode'}
|
||
** Remove episode
|
||
*index_episode.modify {clear}
|
||
*
|
||
* convert to xmltv_ns:
|
||
index_temp_3.modify {clear}
|
||
index_temp_4.modify {clear}
|
||
index_temp_2.modify {substring(type=sentence)|'index_episode' -1 1} * the Del and av part
|
||
index_episode.modify {calculate(~ "Säsong" format=F0)|'index_episode' 1 -} * convert Säsong s+1 in s
|
||
index_episode.modify {clear(~ "Del")}
|
||
index_temp_4.modify {calculate(format=F0)|'index_temp_2' 1 -} * convert Del d+1 in d, store in index_temp_4
|
||
index_temp_5.modify {substring('index_temp_2' ~ "av" type=word)|'index_temp_2' -1 1} * the av number
|
||
index_episode.modify {addend|.'index_temp_4'} * add together s and del
|
||
index_episode.modify {addend('index_temp_2' ~ "av")|/'index_temp_5'}
|
||
index_episode.modify {addend('index_temp_2' not ~ "av")|.}
|
||
index_episode.modify {clear(~ "-1")}
|
||
end_scope
|
||
|
||
*
|
||
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
|
||
**
|
||
** @auto_xml_channel_start
|
||
index_site_channel.scrub {multi|kanal...</option>|">|</option>|</form>}
|
||
index_site_id.scrub {multi|kanal...</option>|<option value="|">|</form>}
|
||
index_site_channel.modify {replace| | }
|
||
scope.range {(channellist)|end}
|
||
index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
|
||
end_scope
|
||
** @auto_xml_channel_end |