epg/siteini.pack/Australia/yourtv.com.au.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

173 lines
8.1 KiB
INI
Executable file

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: yourtv.com.au
* @MinSWversion: V1.57
* @Revision 5 - [15/11/2016] Blackbear199
* showsplit fix
* @Revision 4 - [16/10/2016] Blackbear199
* rewrite again
* @Revision 3 - [12/06/2016] Blackbear199
* rewrite
* @Revision 2 - [16/04/2014] Jan van Straaten
* added keepindexpages, channellist creation block
* @Revision 1 - [20/12/2011] Jan van Straaten
* removed keepindexpages, doesn't work in 109
* @Remarks:
*
* @header_end
**------------------------------------------------------------------------------------------------
*
* set timezone= to the austraila timezone for the region you selected.use timezone=? and run webgrab once.
* open you webgrab++.log and there will be a list of valid timezones for the world.
*
site {url=yourtv.com.au|timezone=UTC+08:00|maxdays=7|cultureinfo=en-AU|charset=UTF-8|titlematchfactor=90}
site {ratingsystem=AU|subtitlestype=ClosedCaption|episodesystem=onscreen|firstshow=1}
*
url_index{url|https://www.yourtv.com.au/api/guide/?day=|urldate|&timezone=Australia%2F##timezone##&format=html&region=##region##}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
*
urldate.format {list|today|tomorrow|{datestring|ddd}}
*
scope.range{(urlindex)|end}
index_temp_1.modify {set|'config_site_id'}
index_temp_2.modify {substring(type=regex)|'index_temp_1' "^.*#([^\#]*)##"} *region id
index_temp_3.modify {substring(type=regex)|'index_temp_1' "##(.*?)$"} *timezone
index_temp_1.modify {remove(type=regex)|^[^#]*(#.*$)} *channel id
url_index.modify {replace|##region##|'index_temp_2'}
url_index.modify {replace|##timezone##|'index_temp_3'}
index_temp_4.modify {substring(type=regex)|'url_index' "day=([^&]*)&"}
index_temp_4.modify {cleanup(style=lower)}
url_index.modify {replace(type=regex)|day=([^&]*)&|'index_temp_4'}
end_scope
*
index_urlchannellogo {url(includeblock="'index_variable_element'")|https://www.yourtv.com.au|<div class="guide__row"|data-channel-logo="|"|>}
*
index_variable_element.modify {set|'index_temp_1'}
index_showsplit.scrub {multi(debug includeblock="data-channel-id="'index_variable_element'"")|<div class="guide__row"|||</section>}
scope.range{(splitindex)|end}
index_showsplit.modify {remove(type=regex)|<div class="guide__row guide__row--sticky".*$}
index_showsplit.modify {substring(type=regex)|"<a class=\"show-link.*?<\/a>"}
index_temp_1.modify {substring(type=regex)|'index_showsplit' "data-event-id=\"(\d+)\""}
index_temp_1.modify {cleanup(removeduplicates span=1 link="index_showsplit")}
end_scope
*
index_start.scrub {single|<p>||</p>|</p>}
index_title.scrub {single|<h4>||</h4>|</h4>}
*
index_urlshow {url|https://www.yourtv.com.au/api/airings/|data-event-id="||">|">}
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate}
*
title.scrub {single|"title":"||"|"}
subtitle.scrub {single|"episodeTitle":"||"|"}
description.scrub {single|"synopsis":"||"|"}
director.scrub {single|"director":"||"|"}
actor.scrub {single(separator=", ")|"mainCast":"||"|"}
category.scrub {single|"genre":{|"name":"|"|}}
category.scrub {single|"programTypeId":||,|,}
productiondate.scrub {single|"yearReleased":"||"|"}
country.scrub {single|"country":"||"|"}
rating.scrub {single|"classification":"||"|"}
showicon.scrub {single|"w320":"||"|"}
*
*temp_1.scrub {single|"seriesNumber":"||"|"}
*temp_1.modify {remove(type=regex)|\d{4}}
*temp_1.modify {addstart(not "")|S}
*temp_2.scrub {single|"episodeNumber":"||"|"}
*temp_2.modify {addstart(not "")|E}
*temp_1.modify {addend('temp_2' not "")|'temp_2'}
*episode.modify {addstart(pattern="S'S1' E'E1'""S'S1'""E'E1'")|'temp_1'}
*
* 2 digit season/episode added to beginning of subtitle episodesystem=onscreen only
temp_1.scrub {single|"seriesNumber":"||"|"}
temp_1.modify {clear("0")} *erase if season number is zero
temp_1.modify {remove(type=regex)|\d{4}} *erase if season number is 4 digits(year)
temp_3.modify {calculate('temp_1' not "" type=char format=F0)|'temp_1' #}
temp_1.modify {addstart('temp_3' "1")|0}
temp_1.modify {addstart('temp_1' not "")|S}
temp_2.scrub {single|"episodeNumber":"||"|"}
temp_4.modify {calculate('temp_2' not "" type=char format=F0)|'temp_2' #}
temp_2.modify {addstart('temp_4' "1")|0}
temp_2.modify {addstart('temp_2' not "")|E}
temp_2.modify {addstart|'temp_1'}
subtitle.modify {addstart('temp_2' not "")|'temp_2' }
*
category.modify {replace|2|Movie}
category.modify {replace|4|Series}
category.modify {replace|5|Series}
category.modify {replace|8|Series}
category.modify {replace|9|Series}
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### REGION FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*url_index{url|https://www.yourtv.com.au/guide/}
*index_site_id.scrub {regex||data-region-id="([^\"]*".*? data-region-timezone="[^\"]*)"||}
*index_site_id.modify {replace(type=regex)|^[^\"]*(".*?timezone="Australia\/)|##}
*index_site_channel.scrub {multi|data-region-name="||"|"}
** @auto_xml_channel_end
*
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
*
* use region <channel.....</channel> from file created above in your WebGrab++.config.xml
*
* Pay Region Ids
*
* Foxtel = 168
* Foxtel Play = 371
* Foxtel on T-Box = 372
* Optus TV Feat Foxtel = 192
* FetchTV = 284
* TransACT = 128
*
* select your region id from the list and edit these 2 lines
*
* subpage.format {list|'index_variable_element'|##region##}
* index_temp_7.modify {set|'index_variable_element'\|##region##'index_temp_3'}
* replace ##REGION## with your region id,example for Foxtel
*
* subpage.format {list|'index_variable_element'|168}
* index_temp_7.modify {set|'index_variable_element'\|168'index_temp_3'}
*
* you can have as many regions as you want,after creating a region channel list
* rename it with the region name,example yourtv.com.au.channels_foxtel_sidney.xml
* or it will be overwritten if you choose to create another channel list with
* a different region id.
*
** @auto_xml_channel_start
*url_index{url|https://www.yourtv.com.au/api/regions/|subpage|/channels}
*****subpage.format {list|'index_variable_element'|##REGION##} ****sample line change region id on line below
*subpage.format {list|'index_variable_element'|168}
*scope.range{(urlindex)|end}
*index_variable_element.modify {substring(type=regex)|'config_site_id' "^([^#]*)##"}
*end_scope
*scope.range{(channellist)|end}
*index_site_id.scrub {|}
*index_temp_9.scrub {regex||\{.*?\}\]||}
*index_variable_element.modify {set|'config_site_id'}
*index_temp_3.modify {substring(type=regex)|'config_site_id' "##.*$"}
*index_temp_4.modify {set|0}
*loop{(each "index_temp_8" in 'index_temp_9')|end}
*****index_temp_7.modify {set|'index_variable_element'\|##region##'index_temp_3'} ****sample line change region id on line below
*index_temp_7.modify {set|'index_variable_element'\|168'index_temp_3'}
*index_temp_7.modify {substring(type=element)|'index_temp_7' 'index_temp_4' 1}
*index_temp_6.modify {substring(type=regex)|'index_temp_8' "\{\"id\":(\d+),\"description\""}
*index_temp_6.modify {addend|#'index_temp_7'}
*index_temp_6.modify {replace|\||###}
*index_temp_1.modify {addend|'index_temp_6'###}
*index_temp_5.modify {substring(type=regex)|'index_temp_8' "\{\"id\":\d+,\"description\":\"[^\"]*\",\"name"\:\"([^\"]*)\",\"callsign\""}
*index_temp_5.modify {replace|\||###}
*index_temp_2.modify {addend|'index_temp_5'###}
*index_temp_4.modify {calculate(format=F0)|1 +}
*end_loop
*index_site_id.modify {addstart|'index_temp_1'}
*index_site_id.modify {replace|###|\|}
*index_site_id.modify {remove(type=element)|-1 1}
*index_site_channel.modify {addstart|'index_temp_2'}
*index_site_channel.modify {replace|###|\|}
*index_site_channel.modify {remove(type=element)|-1 1}
*index_site_id.modify {cleanup(removeduplicates link="index_site_channel")}
*end_scope
** @auto_xml_channel_end