mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
121 lines
5.7 KiB
INI
Executable file
121 lines
5.7 KiB
INI
Executable file
**------------------------------------------------------------------------------------------------
|
||
* @header_start
|
||
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
|
||
* @Site: fetchtv.com.au
|
||
* @MinSWversion: V1.57
|
||
* @Revision 0 - [20/10/2016] Blackbear199
|
||
* - creation
|
||
* @Remarks: cookies required
|
||
* @header_end
|
||
**------------------------------------------------------------------------------------------------
|
||
site {url=fetchtv.com.au|timezone=UTC|maxdays=7|cultureinfo=en-AU|charset=UTF-8|titlematchfactor=90}
|
||
site {ratingsystem=AU|episodesystem=onscreen|loadcookie=fetchtv.com.au.cookies.txt}
|
||
|
||
url_index{url|https://www.fetchtv.com.au/v2/epg/programs?channel_ids=|channel|&block=4-|subpage|&count=2}
|
||
|
||
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
|
||
url_index.headers {contenttype=application/x-www-form-urlencoded}
|
||
url_index.headers {accept=application/json, text/javascript}
|
||
*
|
||
urldate.format {datestring|yyyy-MM-dd}
|
||
subpage.format {list(format=D0 step=2 count=3)|'index_variable_element'}
|
||
*
|
||
scope.range{(urlindex)|end}
|
||
index_variable_element.modify {calculate(format=date,java)|'urldate'}
|
||
index_variable_element.modify {calculate(format=F0)|14400000 /}
|
||
index_variable_element.modify {calculate(format=F0)|2 +}
|
||
end_scope
|
||
*
|
||
scope.range{(datelogo)|end}
|
||
index_temp_1.modify {set|'config_site_id'}
|
||
index_urlchannellogo.modify {addstart|https://www.fetchtv.com.au/v2/epg/channels/'index_temp_1'/image}
|
||
index_variable_element.scrub {multi|"synopses": {||}|}}
|
||
end_scope
|
||
*
|
||
index_showsplit.scrub {multi|"channels": {|[[|]]|}}}
|
||
index_showsplit.modify {replace|], [|\|}
|
||
index_showsplit.modify {cleanup(removeduplicates)}
|
||
*
|
||
scope.range{(indexshowdetails)|end}
|
||
index_start.scrub {regex||^\d+, ".*?", (\d{13}),||}
|
||
index_stop.scrub {regex||^\d+, ".*?", \d{13}, (\d{13}),||}
|
||
index_title.scrub {regex||^\d+, "(.*?)", \d{13},||}
|
||
index_subtitle.scrub {regex||"\d{16}", "(.*?)", "||}
|
||
index_category.scrub {regex||"([^\"]*)", "\d{16}",||}
|
||
*
|
||
index_temp_3.scrub {regex||"\d{16}", ".*?", "(\d+)",||}
|
||
index_temp_3.modify {remove|"}
|
||
index_temp_3.modify {remove(type=regex)|\d{4}}
|
||
index_temp_3.modify {addstart(not "")|S}
|
||
index_temp_4.scrub {regex||"\d{16}", ".*?", "\d+", "(\d+)",||}
|
||
index_temp_4.modify {remove|"}
|
||
index_temp_4.modify {addstart(not "")|E}
|
||
index_temp_4.modify {addstart('index_temp_3' not "")|'index_temp_3'}
|
||
index_episode.modify {addstart(pattern="S'S1'E'E1'""S'S1'""E'E1'")|'index_temp_4'}
|
||
*
|
||
index_title.modify {remove|"}
|
||
index_subtitle.modify {remove|"}
|
||
index_subtitle.modify {clear(~ "Episode")}
|
||
index_category.modify {remove|"}
|
||
*
|
||
index_temp_1.scrub {regex||^\d+, ".*?", \d{13}, \d{13}, (\d+),||}
|
||
index_description.modify {substring(type=regex)|'index_variable_element' "\"'index_temp_1'\": \"([^\"]*)\""}
|
||
index_description.modify {cleanup(removeduplicates)}
|
||
end_scope
|
||
*
|
||
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||
** ##### REGION FILE CREATION (only to create the xxx-channel.xml file)
|
||
**
|
||
** @auto_xml_channel_start
|
||
*url_index {url|https://www.fetchtv.com.au/v2/epg/channels}
|
||
*index_site_id.scrub {multi|"region_details": {||}}|}}}
|
||
*index_site_id.modify {substring(type=regex)|"\"(\d+)\":"}
|
||
*index_site_channel.scrub {multi|"region_details": {||}}|}}}
|
||
*index_site_channel.modify {substring(type=regex)|"\[\"(.*?)\"\]"}
|
||
*index_site_channel.modify {replace|", "| }
|
||
** @auto_xml_channel_end
|
||
*
|
||
*
|
||
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
|
||
**
|
||
* use region line from above
|
||
*
|
||
** @auto_xml_channel_start
|
||
*url_index {url|https://www.fetchtv.com.au/v2/epg/channels}
|
||
*scope.range{(channellist)|end}
|
||
*index_site_id.scrub {regex||"(\d+)": \{"description": "[^\"]*", "subscribed": true,||}
|
||
*index_site_channel.scrub {regex||\{"description": "[^\"]*", "subscribed": true,.*?"regions": (\[.*?"name": "[^\"]*)"\}||}
|
||
*index_site_channel.modify {replace(type=regex)|\](.*?"name": ")| }
|
||
*index_temp_1.modify {set|0}
|
||
*index_temp_2.modify {set|'config_site_id'}
|
||
*loop{(each "index_temp_9" in 'index_site_channel')|end}
|
||
*index_temp_8.modify {substring(type=regex)|'index_temp_9' "\[([^\]]*)\]"}
|
||
*index_temp_8.modify {addstart|#}
|
||
*index_temp_8.modify {addend|#}
|
||
*index_temp_6.modify {substring(type=element)|'index_site_id' 'index_temp_1' 1}
|
||
*index_temp_3.modify {set|#'index_temp_2',}
|
||
*index_temp_7.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_9'##}
|
||
*index_temp_5.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_6'##}
|
||
*index_temp_3.modify {set|, 'index_temp_2',}
|
||
*index_temp_7.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_9'##}
|
||
*index_temp_5.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_6'##}
|
||
*index_temp_3.modify {set|, 'index_temp_2'#}
|
||
*index_temp_7.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_9'##}
|
||
*index_temp_5.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_6'##}
|
||
*index_temp_3.modify {set|#'index_temp_2'#}
|
||
*index_temp_7.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_9'##}
|
||
*index_temp_5.modify {addend('index_temp_8' ~ 'index_temp_3')|'index_temp_6'##}
|
||
*index_temp_7.modify {addend('index_temp_8' "##")|'index_temp_9'##}
|
||
*index_temp_5.modify {addend('index_temp_8' "##")|'index_temp_6'##}
|
||
*index_temp_1.modify {calculate(format=F0)|1 +}
|
||
*end_loop
|
||
*index_site_id.modify {set|'index_temp_5'}
|
||
*index_site_id.modify {replace|##|\|}
|
||
*index_site_id.modify {remove(type=element)|-1 1}
|
||
*index_site_channel.modify {set|'index_temp_7'}
|
||
*index_site_channel.modify {replace|##|\|}
|
||
*index_site_channel.modify {remove(type=element)|-1 1}
|
||
*index_site_channel.modify {remove(type=regex)|\[[^\]]*\]\s}
|
||
*end_scope
|
||
** @auto_xml_channel_end
|