**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: tvtv.at
* @MinSWversion: 1.1.1/49
* @Revision 3 - [21/06/2013] Jan van Straaten
* - improved episode and subtitle
* @Revision 2 - [05/04/2013] Jan van Straaten
* - for three weeks of epg
* @Revision 1 - [05/04/2013] Jan van Straaten
* @Revision 0 - [02/03/2013] Jan van Straaten
* - creation
* @Remarks: Based on tvtv.de rev 5.
* @header_end
**------------------------------------------------------------------------------------------------
site {url=tvtv.at|timezone=UTC+01:00|maxdays=21.3|cultureinfo=de-AT|charset=utf-8|titlematchfactor=90}
site {subtitlestype=Gehörlose}
url_index{url|http://tvtv.at/senderlistings_channel.php?channel=|channel|&woche=|urldate}
*http://tvtv.de/senderlistings_channel.php?channel=ORF1&woche=2
*
urldate.format {list|0|0|0|0|0|0|0|1|1|1|1|1|1|1|2|2|2|2|2|2|2}
*
index_showsplit.scrub {multi|
}
****
* The index page is a 21 days tvguide with the shows grouped in two hour fragments
* the order of these fragments is :
* week 1
* 0: fragment 1 day 1, 1: fragment 1 day 2, ....., 6: fragment 1 day 7.
* 7: fragment 2 day 1, 8: fragment 2 day 2, ....., 13: fragment 2 day 7.
* ...
* 77: fragment 12 day 1, 78: fragment 12 day 2, ....., 84: fragment 12 day 7.
* week 2
* fragment 1 day 8, fragment 1 day 9, ....., fragment 1 day 14.
* fragment 2 day 8, fragment 2 day 9, ....., fragment 2 day 14.
* ...
* fragment 12 day 8, fragment 12 day 9, ....., fragment 12 day 14.
* week 3
* fragment 1 day 15, fragment 1 day 16, ....., fragment 1 day 21.
* fragment 2 day 15, fragment 2 day 16, ....., fragment 2 day 21.
* ...
* fragment 12 day 15, fragment 12 day 16, ....., fragment 12 day 21.
*
scope.range {(splitindex)|end}
index_temp_6.modify {calculate(type=element format=F0)|'index_showsplit' #}
index_temp_6.modify {calculate(format=F0)|1 - 7 /} * we use this to determine how many weeks in the index page
* first sorting, time fragments of the days after each other, days still mixed up
index_temp_1.modify {substring(type=element)|'index_showsplit' 0 1/7} * all 12 fragments of day01|day08|day15
index_temp_1.modify {replace|\||####} * we must make it single to use it in a add operation
index_temp_2.modify {addend|'index_temp_1'####}
index_temp_1.modify {substring(type=element)|'index_showsplit' 1 1/7} * all 12 fragments of day02|day09|day16
index_temp_1.modify {replace|\||####} * we must make it single to use it in a add operation
index_temp_2.modify {addend|'index_temp_1'####}
index_temp_1.modify {substring(type=element)|'index_showsplit' 2 1/7} * all 12 fragments of day03|day10|day17
index_temp_1.modify {replace|\||####} * we must make it single to use it in a add operation
index_temp_2.modify {addend|'index_temp_1'####}
index_temp_1.modify {substring(type=element)|'index_showsplit' 3 1/7} * all 12 fragments of day04|day11|day18
index_temp_1.modify {replace|\||####} * we must make it single to use it in a add operation
index_temp_2.modify {addend|'index_temp_1'####}
index_temp_1.modify {substring(type=element)|'index_showsplit' 4 1/7} * all 12 fragments of day05|day12|day19
index_temp_1.modify {replace|\||####} * we must make it single to use it in a add operation
index_temp_2.modify {addend|'index_temp_1'####}
index_temp_1.modify {substring(type=element)|'index_showsplit' 5 1/7} * all 12 fragments of day06|day13|day20
index_temp_1.modify {replace|\||####} * we must make it single to use it in a add operation
index_temp_2.modify {addend|'index_temp_1'####}
index_temp_1.modify {substring(type=element)|'index_showsplit' 6 1/7} * all 12 fragments of day07|day14|day21
index_temp_1.modify {replace|\||####} * we must make it single to use it in a add operation
index_temp_2.modify {addend|'index_temp_1'####}
index_temp_2.modify {replace|####|\|} * back to multi for operation substring
* Second sorting, order the days
index_showsplit.modify {clear}
* first week:
index_temp_3.modify {substring(type=element)|'index_temp_2' 0 12/'index_temp_6'} * all 12 fragments of day1,2,3,4,5,6,7
index_temp_3.modify {replace|\||####} * single again
index_showsplit.modify {addend|'index_temp_3'####}
* second week:
index_temp_3.modify {substring('index_temp_6' > "12" type=element)|'index_temp_2' 12 12/'index_temp_6'} * all 12 fragments of day8,9,10,11,12,13,14
index_temp_3.modify {replace('index_temp_6' > "12")|\||####} * single again
index_showsplit.modify {addend('index_temp_6' > "12")|'index_temp_3'####}
* third week
index_temp_3.modify {substring('index_temp_6' > "24" type=element)|'index_temp_2' 24 12/'index_temp_6'} * all 12 fragments of day15,16,17,18,19,20,21
index_temp_3.modify {replace('index_temp_6' > "24")|\||####} * single again
index_showsplit.modify {addend('index_temp_6' > "24")|'index_temp_3'####}
index_showsplit.modify {replace|####|\|} * all the 2 hour fragments sorted
*******
index_showsplit.modify {replace||\|} * split the individual shows within a 2 hour block
index_showsplit.modify {select|"title=" ~~} * select the real index shows
end_scope.range
*
scope.range {(indexshowdetails)|end}
index_temp_1.scrub {single(separator="', '" include=2)|openDetailPopup|(|);|}
index_urlshow.modify {addstart('index_temp_1' not "")|http://tvtv.at/detailansicht.php?sendungs_id='index_temp_1'}
*http://tvtv.at/detailansicht.php?sendungs_id=216703670
index_urlchannellogo {url|http://tvtv.at/| | | ||}
index_start.scrub {single|||<|<}
index_title.scrub {single|title="mehr|"|"">|}
end_scope
scope.range {(showdetails)|end}
title.scrub {single||class="DetailTitel">|| }
title.modify {cleanup}
titleoriginal.scrub {single||||}
subtitle.scrub {single(exclude="" separator="," exclude="Staffel""Folge")||||}
description.scrub {single||||}
description.scrub {single|||| }
description.modify {cleanup}
director.scrub {single||'">||}
actor.scrub {multi||'">||}
actor.modify {addend|>}
actor.modify {cleanup(tags="<"">")}
actor.modify {remove|>}
actor.modify {remove|,}
presenter.scrub {multi||'">||}
presenter.modify {cleanup(removeduplicates=name)}
presenter.modify {cleanup}
producer.scrub {single||||}
producer.modify {cleanup}
writer.scrub {multi||'">||}
writer.modify {cleanup}
composer.scrub {multi||'">||}
composer.modify {cleanup}
category.scrub {single||||}
category.scrub {multi||'">||}
productiondate.scrub {single||||}
episode.scrub {single(exclude="" separator="," include="Staffel""Folge")||||}
episode.modify {replace|\||,}
temp_1.scrub {single||||}
subtitles.modify {addstart('temp_1' ~"Gehörlose")|true}
videoaspect.modify {addstart('temp_1' ~ "Breitbild")|Breitbild}
videoquality.modify {addstart('temp_1' ~ "HDTV")|HDTV}
*
end_scope.range
*
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*index_site_channel.scrub {multi|||}
*index_site_id.scrub {multi|a href="senderlistings_channel.php?channel=||">|}
** @auto_xml_channel_end |