epg/siteini.pack/Canada/canada.com.L9H1N3.ini

104 lines
5.9 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: canada.com
* @MinSWversion: 1.1.1/55.11
* @Revision 2 - [21/01/2015] Jan van Straaten
* - improved channellist , accepts complex numerical site_id like 51-1
* @Revision 1 - [09/01/2015] Jan van Straaten
* - complete new creation
* @Remarks: Makes use of the times from showdetail page option of 55.11
* @header_end
**------------------------------------------------------------------------------------------------
site {url=canada.com|timezone=UTC|maxdays=8|cultureinfo=en-CA|charset=iso-8859-1|titlematchfactor=0|ratingsystem=CBSC}
site {loadcookie=canada.com_cookies.txt}
scope.range {(urlindex)|end}
index_variable_element.modify {calculate(format=date,unix)|'urldate'}
*subpage.format {list(step=21600 count=4)|'index_variable_element'} * 6 hour steps ---> set wd=1005
subpage.format {list(step=43200 count=2)|'index_variable_element'} * 12 hour steps ---> set wd=1905
url_index{url(debug)|http://tvmds.tvpassport.com/snippet/white_label/php/grid.php?subid=tvpassport&lang=en&lu=1743&tz=UTC&items=90&sess=405421C2B575D7DBDC4AA691C0BE9B0B&st=|subpage|&wd=1905}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}* to speedup the downloading of the index pages
end_scope
* the url from IE Dev tools:
*http://tvmds.tvpassport.com/snippet/white_label/php/grid.php?subid=tvpassport&mode=json&lang=en&lu=36625D&tz=America%2FToronto&items=90&sess=60B98B964B06A8263C3366B7E3792953&st=&wd=940&nc=0&div=tvmds_frames&si=0&callback=jsonp1420552422682
* it appears that the following can be left out:
* callback=jQuerey... and
* numhours=.. (is related to wd= e.g wd=1904 numhours=11 wd=1905 numhours=12 it also changes from 5 to 6 at 1004 and 1005
* div=tvmds_frames and
* items=... and
* ctrlpos=top and
* style=wh and
* ch=.. defaults to ch=1 for any value?
* &wid=&css_url= obviously because they are without value anyhow
*
* The following have influence
* wd= very important : determines the hours timespan counted from the st= startvalue
* st= the start date/time in unix timeformat
* sess=.... the session id, this is the user default as set by the user on the site. The value can be copied from the cookies
* cookie www.canada.com TRUE / FALSE 1502794471 id 41EB66C9325A41E09E43DD60A377E51E
* lu=5931D an important value, without it no epg, can be optained from a certain url, see canada.com_info.txt
* tz=.. sets the timezone , the database values seem to work, set it to UTC
* &mode=json .. output in json, if left out in plain html
* still unknown influence if any
* ht=.. defaults to 445 if left out
scope.range {(datelogo)|end}
index_variable_element.modify {clear}
index_variable_element.modify {addstart|\'tvm_chan_'config_site_id'\'}
end_scope
scope.range {(splitindex)|end}
index_showsplit.scrub {multi(include='index_variable_element')|<td id='|||</td>}
index_temp_1.modify {substring(type=regex)|'index_showsplit' "\A(\d{9})"}
index_temp_1.modify {cleanup(removeduplicates link="index_showsplit" span=2 keepfirst)}
*index_showsplit.modify {replace()|\||\|\n\n} * for inspection only, can be disabled
end_scope
scope.range {(indexshowdetails)|end}
*index_start.scrub {single|} * no start and stop in index
index_title.scrub {regex()||title=\\"Click for more details\\".+?\\">(.+?)<\/td>||}
title=\"Click for more details\" width=\"3%\">Four Senses <\/td></td>
* prepare the urlshow
index_temp_1.scrub {regex||TVMDS.programinfo.programDetails\((\d{9}, \d+?, '\d+?.')||} * value 281272512, 6056, '5931D'
index_temp_1.modify {addstart(not "")|&ltid=}
index_temp_1.modify {replace|, '|&luid=}
index_temp_1.modify {replace|, |&stid=}
index_temp_1.modify {remove()|'} * value &ltid=281272717&stid=6056&luid=5931D
index_urlshow.modify {addstart('index_temp_1' not "")|http://tvmds.tvpassport.com/snippet/white_label/php/program_details_V2.php?subid=tvpassport&sid=405421C2B575D7DBDC4AA691C0BE9B0B&tz=UTC'index_temp_1'&lang=en}
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the detail pages
end_scope
* details:
* start time from detail!!
temp_1.scrub {single()|<strong>Date</strong>|tvm-program-details">|</li>|</ul>} * the date as in Saturday, Dec 13, without the year!
temp_2.modify {calculate(format=date,yyyy)|'urldate'} *the year
temp_1.modify {addend|, 'temp_2'} * dates as provided need a year to be recognised
start.scrub {single()|<strong>Time</strong>|tvm-program-details">|</li>|</ul>}
start.modify {addstart()|'temp_1' }
title.scrub {single|<span class="h4">||</strong>|</span>}
title.modify {replace|<strong>|:}
title.modify {cleanup(tags="<"">")}
description.scrub {single(separator="<p class=\'tvm-movie-details\'>" include=first)|<p class="tvm-show-description">||</p>|</div>}
description.modify {cleanup(tags="<"">")}
rating.scrub {single|<strong>Rating</strong>|tvm-program-details">|</li>|</ul>}
actor.scrub {regex()||<p class="tvm-cast-person"><strong>(.+?)</strong><br><span class="tvm-cast-role">Cast</span>||}
director.scrub {regex||<p class="tvm-cast-person"><strong>([^<]*)</strong><br><span class="tvm-cast-role">Director</span>||}
category.scrub {single|<strong>Genre</strong>|tvm-program-details">|</li>|</ul>}
productiondate.scrub {single|<strong>Year</strong>|<li class="tvm-xs-7">|</li>|</ul>}
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
* @auto_xml_channel_start
*index_site_channel.scrub {regex()||chan_name\\">(.+?)<||}
*index_site_id.scrub {regex||<tr id=\\"tvm_chan_(\d{1,3}(?:-\d{1,3})?)\\"||}
*scope.range {(channellist)|end}
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
*end_scope
* @auto_xml_channel_end