98 lines
4.5 KiB
INI
Executable File
98 lines
4.5 KiB
INI
Executable File
**------------------------------------------------------------------------------------------------
|
|
* @header_start
|
|
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
|
|
* @Site: filmon.com
|
|
* @MinSWversion: 1.1.1/54
|
|
* @Revision 5 - [01/07/2015] Francis De Paemeleere
|
|
* - adapted to site changes (new api)
|
|
* @Revision 4 - [04/11/2014] Francis De Paemeleere
|
|
* - adapted to site changes
|
|
* @Revision 3 - [01/10/2014] Jan van Straaten
|
|
* - adapted to site changes
|
|
* @Revision 2 - [05/09/2014] Francis De Paemeleere
|
|
* - create .channels.xml now working with dummy channel input
|
|
* - fix fistshow detection (sometimes a previous day is available, sometimes only the current day)
|
|
* So we will start at the "NOW" point (always correct)
|
|
* @Revision 1 - [22/06/2014] Jan van Straaten
|
|
* - complete rewrite, site changed
|
|
* @Revision 0 - [2/10/2013] Jan van Straaten
|
|
* - creation
|
|
* @Remarks:
|
|
* @header_end
|
|
**------------------------------------------------------------------------------------------------
|
|
*
|
|
site {url=filmon.com|timezone=UTC|maxdays=7.1|cultureinfo=en-US|charset=utf-8|titlematchfactor=90|episodesystem=xmltv_ns}
|
|
site {allowlastpageoverflow}
|
|
url_index{url|http://www.filmon.com/api-v2/tvguide/|channel|}
|
|
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
|
|
|
|
index_showsplit.scrub {multi|{"programme":"|||}
|
|
|
|
scope.range {(splitindex)|end}
|
|
* only get shows from the future (no older shows)
|
|
index_temp_1.modify {clear}
|
|
index_temp_5.modify {clear}
|
|
index_variable_element.modify {clear}
|
|
index_variable_element.modify {addstart|'now'}
|
|
index_variable_element.modify {calculate(format=utcdate,unix)}
|
|
loop {(each 'index_temp_6' in 'index_showsplit' max=3000)|end}
|
|
index_temp_3.modify {clear}
|
|
index_temp_3.modify {substring(type=regex)|'index_temp_6' "^.*?"startdatetime"\s*:\s*([+-]?\d*)"}
|
|
index_temp_1.modify {addend('index_temp_3'>='index_variable_element')|'index_temp_6'###_###} * for now, only add show if not an overlay shows (=show that is part of a bigger show)
|
|
end_loop
|
|
index_showsplit.modify {clear}
|
|
index_showsplit.modify {addstart|'index_temp_1'}
|
|
index_showsplit.modify {replace|###_###|\|}
|
|
end_scope
|
|
|
|
index_start.scrub {regex||"startdatetime"\s*:\s*([+-]?\d*)||}
|
|
index_stop.scrub {regex||"enddatetime"\s*:\s*([+-]?\d*)||}
|
|
index_title.scrub {regex||"programme_name"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||}
|
|
index_description.scrub {regex||"programme_description"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||}
|
|
index_showicon.scrub {single|"size":"150x150"|"url":"|","|\}}
|
|
index_temp_1.scrub {regex||"seriesNumber"\s*:\s*([+-]?\d+)[^\}]*"isSeries":1||}
|
|
index_temp_2.scrub {regex||"episodeNumber"\s*:\s*([+-]?\d+)[^\}]*"isSeries":1||}
|
|
|
|
scope.range{(datelogo)|end}
|
|
index_variable_element.modify {clear}
|
|
index_variable_element.modify {addstart|'config_site_id'}
|
|
index_urlchannellogo.modify {addstart|http://static.filmon.com/couch/channels/'index_variable_element'/big_logo.png}
|
|
end_scope
|
|
|
|
scope.range{(indexshowdetails)|end}
|
|
index_start.modify {calculate(format=time)}
|
|
index_stop.modify {calculate(format=time)}
|
|
* index_temp_1 = season
|
|
* index_temp_2 = episode
|
|
index_episode.modify {clear}
|
|
index_episode.modify {addend('index_temp_1' not="")|'index_temp_1'}
|
|
index_episode.modify {addend|.}
|
|
index_episode.modify {addend('index_temp_2' not="")|'index_temp_2'}
|
|
index_episode.modify {addend|.}
|
|
index_episode.modify {clear(="..")}
|
|
|
|
index_title.modify {cleanup(style=jsondecode)}
|
|
index_description.modify {cleanup(style=jsondecode)}
|
|
index_showicon.modify {cleanup(style=jsondecode)}
|
|
|
|
index_description.modify {remove|\\r}
|
|
index_description.modify {remove|\\n}
|
|
end_scope
|
|
|
|
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
|
|
**
|
|
** @auto_xml_channel_start
|
|
*url_index{url|http://www.filmon.com/tv/live}
|
|
*index_site_id.scrub {single||||}
|
|
*index_temp_1.scrub {regex||var groups\s*=\s*\[.*?\];||}
|
|
*scope.range {(channellist)|end}
|
|
*index_site_id.modify {clear}
|
|
*index_site_channel.modify {clear}
|
|
*index_site_id.modify {substring(type=regex)|'index_temp_1' "\{"id"\s*:\s*([+-]?\d+)[^\{]*"title"\s*:\s*"[^"\\]*(?:\\.[^"\\]*)*""}
|
|
*index_site_channel.modify {substring(type=regex)|'index_temp_1' "\{"id"\s*:\s*[+-]?\d+[^\{]*"title"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)""}
|
|
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
|
|
*end_scope
|
|
** @auto_xml_channel_end
|
|
|