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

114 lines
6.1 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: ontv.se
* @MinSWversion: V0
* none
* @Revision 0 - [02/04/2012] Willy de Wilde/Jan van Straaten
* none
* @Remarks:
* none
* @header_end
**------------------------------------------------------------------------------------------------
site {url=ontv.se|timezone=UTC+01:00|maxdays=14|cultureinfo=se-SE|charset=UTF-8|titlematchfactor=90}
url_index{url()|http://ontv.se/tv-guide/|channel|/|urldate|}
*site {loadcookie=ontv.se.cookies.txt}
urldate.format {datestring|yyyy-MM-dd}
*
index_showsplit.scrub {multi()|<td style="width:40px;|||</tr>}
index_urlshow {url ()|http://ontv.se|<td><p>|href="|" programid="|</a>}
index_date.scrub {single(force include=last)|<div class="content" id="content">|/20|" style="text-decoration:underline;">|</table>}
index_start.scrub {single()|text-align:right;">|<p>|:</p>|</p>}
index_title.scrub {single()|<a href="|summary">|</a>|}
*
title.scrub {single(separator=" <img" include=first)|<div class="content" id="content">|<td><h1>|</h1><p>|</h1><p>}
description.scrub {single (separator="Läs mer" exclude="på ontv.se och se när Damages sänds igen" "ontv.se")|<meta name="Description" content="||">|">}
*
* operations:
index_date.modify {addstart()|20}
productiondate.modify {calculate(format=productiondate)|'description'}
*
*extract subtitle and episode from description
* from a sentence like .. Del 5 av 6: Marknadsföring.
temp_1.modify {calculate(type=char format=F0)|'description' "Del " @} * index of Del
temp_2.modify {substring(type=char)|'description' 'temp_1'} * description starting at Del
temp_1.modify {calculate(type=char format=F0)|'temp_2' ": " @} * first index of : in 'temp_2'
episode.modify {substring(type=char)|'temp_2' 0 'temp_1'}
temp_1.modify {calculate(format=F0)|2 +}
temp_2.modify {remove(type=char)|'temp_2' 0 'temp_1'} * remove the episode part
temp_1.modify {calculate(type=char format=F0)|'temp_2' ". " @} * first index of . in 'temp_2'
subtitle.modify {substring(type=char)|'temp_2' 0 'temp_1'}
description.modify {remove|'episode': 'subtitle'.}
*
*extract credits from description
*director .. Regi:
temp_1.modify {calculate(type=char format=F0)|'description' "Regi:" @} * index of Regi:
temp_2.modify {substring(type=char)|'description' 'temp_1'} * description starting at Regi:
temp_1.modify {calculate(type=char format=F0)|'temp_2' "I rollerna:" @} * first index of I rollerna: in 'temp_2'
director.modify {substring(type=char)|'temp_2' 0 'temp_1'}
description.modify {remove|'director'}
director.modify {remove|Regi: }
director.modify {replace|, |\|} * make multi
*actor .. I rollerna:
temp_1.modify {calculate(type=char format=F0)|'description' "I rollerna:" @} * index of I rollerna:
temp_2.modify {substring(type=char)|'description' 'temp_1'} * description starting at I rollerna:
temp_1.modify {calculate(type=char format=F0)|'temp_2' "m.fl." @} * first index of m.fl. in 'temp_2'
actor.modify {substring(type=char)|'temp_2' 0 'temp_1'}
description.modify {remove|'actor'm.fl.}
actor.modify {remove|I rollerna: }
actor.modify {replace|, |\|} * make multi
*presenter Programledare:
temp_1.modify {calculate(type=char format=F0)|'description' "Programledare:" @} * index of Programledare:
temp_2.modify {substring(type=char)|'description' 'temp_1'} * description starting at Programledare:
temp_1.modify {calculate(type=char format=F0)|'temp_2' "\nFrån" @} * first index of Från in 'temp_2'
temp_1.modify {calculate("-1" type=char format=F0)|'temp_2' "." @} * alternative : first . if no Från in 'temp_2'
presenter.modify {substring(type=char)|'temp_2' 0 'temp_1'}
description.modify {remove|'presenter'}
presenter.modify {remove|Programledare: }
presenter.modify {replace|, |\|} * make multi
*
*extract videoaspect & quality from description .. Sänds i HD4:3-format.
temp_1.modify {calculate(type=char format=F0)|'description' "Sänds i" -@} * last index of Sänds i
temp_2.modify {substring(type=char)|'description' 'temp_1'} * description starting at Sänds i
videoquality.modify {addstart('temp_2' ~ "HD")|HDTV}
videoaspect.modify {addstart('temp_2' ~ "4:3")|4:3}
videoaspect.modify {addstart('temp_2' ~ "16:9")|16:9}
description.modify {remove('temp_2' not " ")|'temp_2'}
*
* extract category from first two description sentences
temp_1.modify {substring(type=sentence)|'description' 0 2}
temp_1.modify {cleanup(style=lower)}
category.modify {addend('temp_1' ~ "serie")|\|serie}
category.modify {addend('temp_1' ~ "drama")|\|drama}
category.modify {addend('temp_1' ~ "dokumentär")|\|dokumentär}
category.modify {addend('temp_1' ~ "kultur")|\|kultur}
category.modify {addend('temp_1' ~ "nöjes")|\|nöjes}
category.modify {addend('temp_1' ~ "musik")|\|musik}
category.modify {addend('temp_1' ~ "reportage")|\|reportage}
category.modify {addend('temp_1' ~ "komedi")|\|komedi}
category.modify {addend('temp_1' ~ "film")|\|film}
category.modify {addend('temp_1' ~ "serie")|\|serie}
category.modify {addend('temp_1' ~ "direktsändning")|\|direktsändning}
category.modify {addend('temp_1' ~ "talkshow")|\|talkshow}
category.modify {addend('temp_1' ~ "humor")|\|humor}
category.modify {addend('temp_1' ~ "samhällsprogram")|\|samhällsprogram}
category.modify {addend('temp_1' ~ "intervjuer")|\|intervjuer}
category.modify {addend('temp_1' ~ "debat")|\|debat}
category.modify {addend('temp_1' ~ "nyhets")|\|nyhets}
category.modify {addend('temp_1' ~ "thriller")|\|thriller}
category.modify {addend('temp_1' ~ "frågesport")|\|frågesport}
temp_1.modify {remove|'category'}
category.modify {addend('temp_1' ~ "sport")|\|sport}
*
description.modify {cleanup}
subtitle.modify {cleanup}
* the following lines create a channel file
url_index {url|http://ontv.se/ajax/channel_list.php?language=se}
*url_index{url()|http://ontv.se/}
*index_site_channel.scrub {multi ()|<p><a href="/tv-guide/|">|</a>|</p}
index_site_channel.scrub {multi|padding:0px 2px;">||</p>|</li>}
*index_site_id.scrub {multi|<p><a href="/tv-guide/||">|</a>}
index_site_id.scrub {multi|href='/tv-guide/||';">|<div}