mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
95 lines
4.9 KiB
INI
Executable file
95 lines
4.9 KiB
INI
Executable file
**------------------------------------------------------------------------------------------------
|
|
* @header_start
|
|
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
|
|
* @Site: primo.eu
|
|
* @MinSWversion: V2.1.4
|
|
* @Revision 6 - [06/09/2017] Jan van Straaten
|
|
* extraction of start/stop times done with the pixel width value of the show in the epg grid of the site.
|
|
* @Revision 5 - [08/08/2017] Blackbear199
|
|
* - start/stop time changes
|
|
* @Revision 4 - [18/01/2017] Blackbear199
|
|
* - changed start/stop to details page.somtimes it doesnt exist on index page.
|
|
* @Revision 3 - [01/05/2016] Blackbear199
|
|
* - added country element,fixed rating and starrating elements
|
|
* @Revision 2 - [18/03/2016] Blackbear199
|
|
* - rewrite
|
|
* @Revision 1 - [13/03/2013] Francis De Paemeleere
|
|
* - fix scope typo
|
|
* - use cleanup tags to remove () addition to actors
|
|
* @Revision 0 - [11/11/2012] Francis De Paemeleere
|
|
* - first version
|
|
* @Remarks:
|
|
* @header_end
|
|
**------------------------------------------------------------------------------------------------
|
|
*
|
|
site {url=primo.eu|timezone=Europe/Brussels|maxdays=7|cultureinfo=nl-BE|charset=utf-8|titlematchfactor=90|allowlastdayoverflow|episodesystem=onscreen}
|
|
*
|
|
url_index {url()|https://www.primo.eu/tv-programs-full-view/|urldate|/|channel|/all}
|
|
url_index.headers {customheader=Accept-Encoding=gzip,deflate,br}
|
|
url_index.headers {host=www.primo.eu}
|
|
url_index.headers {accept=text/html, application/xhtml+xml, image/jxr, */*}
|
|
*
|
|
urldate.format {datenumber|UNIX}
|
|
scope.range{(splitindex)|end}
|
|
index_showsplit.scrub {single()||||}
|
|
index_showsplit.modify {replace()|<div id="programs-content"|<div id="programs-content" top_of_page </div>} * keep 'top of index_page in the showsplit element
|
|
index_showsplit.modify {substring(type=regex)|"((?:<div id="programs-content"\|<div style="width:\d+?px;" class="program).+?</div>)"}
|
|
index_showsplit.modify {remove(type=element)|0 1} * first show is a top of page, no need
|
|
*index_showsplit.modify {(debug)}
|
|
global_temp_1.modify {calculate(format=date,dd/MM/yyyy)|'now'}
|
|
* listing starts at 6:00
|
|
global_temp_1.modify {calculate(format=date,unix)|0:6:0 +} * start of listing
|
|
end_scope
|
|
*
|
|
scope.range {(indexshowdetails)|end}
|
|
index_urlshow {url|https://www.primo.eu/tvprograms/ajaxcallback/|<h3 id="||">|">}
|
|
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate}
|
|
*
|
|
index_temp_1.scrub {regex()||<div id="programs-content"\s(.+?)\s</div>||} * scrub the top of index page = day start
|
|
global_temp_1.modify {calculate(debug 'index_temp_1' "top_of_page" format=date,unix)|1:0:0 +} * add one day to starttime of the listing
|
|
index_temp_2.scrub {regex()||\A<div style="width:(\d+?)px;"||} *width in px, 1 min = 5px
|
|
index_temp_2.modify {calculate(format=F0)|5 / 60 *} *actual duration in seconds
|
|
index_temp_3.modify {calculate(format=F0)|'previous_index_temp_3' 'index_temp_2' +} * cumulative duration in seconds
|
|
index_temp_3.modify {set('index_temp_1' "top_of_page")|0} * set cumulative duration to zero at (next) daystart
|
|
index_start.modify {calculate(format=F0)|'global_temp_1' 'previous_index_temp_3' +}
|
|
index_stop.modify {calculate(format=F0)|'global_temp_1' 'index_temp_3' +}
|
|
* alternative for index_stop
|
|
*index_duration.modify {calculate(format=F0)|'index_temp_2' 60 /}
|
|
index_title.scrub {regex||<h3[^>]*>([^<]+)</h3>||}
|
|
end_scope
|
|
*
|
|
scope.range {(showdetails)|end}
|
|
title.scrub {single|Programmanaam:|<span>|</span>|</div>}
|
|
subtitle.scrub {single|Titel aflevering:|<span>|</span>|</div>}
|
|
description.scrub {single|Synopsis:|<span>|</span|</div>}
|
|
category.scrub {single|Genre:|<span>|</span>|</div>}
|
|
director.scrub {single|Regisseur:|<span>|</span>|</div>}
|
|
actor.scrub {multi|<span class='cast cast|'>|</span>|</div>}
|
|
presenter.scrub {single|Presentatie:|<span>|</span>|</div>}
|
|
productiondate.scrub {single|Jaar:|<span>|</span>|</div>}
|
|
starrating.scrub {single|Rating:|<span>|</span>|</div>}
|
|
rating.scrub {single|Minimumleeftijd:|<span> (|)</span>|</div>}
|
|
country.scrub {single|Land:</label><span>||</span>|</span>}
|
|
*
|
|
temp_1.scrub {single|Seizoen:|<span>|</span>|</div>}
|
|
episode.scrub {single|Nr. aflevering:|<span>|</span>|</div>}
|
|
episode.modify {addstart('episode' not "")|S'temp_1'E}
|
|
*
|
|
description.modify {clear('description' "-")}
|
|
category.modify {clear('description' "-")}
|
|
episode.modify {clear('episode'~"-")}
|
|
subtitle.modify {clear('subtitle' "-")}
|
|
actor.modify {substring(type=regex)|"(.+?)\("}
|
|
starrating.modify {calculate(format=F1)}
|
|
starrating.modify {clear('starrating' "0.0")}
|
|
end_scope
|
|
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
**
|
|
** @auto_xml_channel_start
|
|
*url_index {url|https://www.primo.eu/tv-programs-full-view/|urldate|/all/all}
|
|
*index_site_channel.scrub {multi|Alle kanalen|">|</option>|</select>}
|
|
*index_site_id.scrub {multi|Alle kanalen|<option value="|">|</select>}
|
|
*scope.range {(channellist)|end}
|
|
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
|
|
*end_scope
|
|
** @auto_xml_channel_end
|