Оценете темата:
  • 0 гласа - средно 0
  • 1
  • 2
  • 3
  • 4
  • 5
Разминаване на дата/час в ЕПГ на TVH
#22
Добре, захванах се да си извлека сам ЕПГ за BBC Earth Polska.
Използвам teleman.pl.ini, като съм променил timezone=Sofia и съм добавил index_start.modify {calculate(format=utctime)}

Код:
**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: teleman.pl
* @Revision 16 - [21/09/2017] Netuddki
*    - Fixes different titles
*       - Fixed some episode related bugs
* @Revision 15 - [04/05/2017] Netuddki
*    - Added country
*    - Added Subtitle
*    - Refined Episode and Title
* @Revision 14 - [02/05/2017] Netuddki
*    - Refined Title (no more suspicious titles)
*    - Refined Category
*       - Added option for Episode system xmltv_ns
*    - Fixed showicon
* @Revision 13 - [06/01/2017] Netuddki
*    - fixed title.scrub
*       - fixed episodes
* @Revision 12 - [16/02/2016] Blackbear199
*    - new .channels.xml generation
*   - url_index change,index_showsplit fix
* @Revision 11 - [20/03/2015] Willy De Wilde
*    - new .channels.xml generation
* @Revision 10 - [13/02/2013] Francis De Paemeleere
*    - site changes
* @Revision 9 - [20/01/2013] Willy De Wilde
*    - site changes
* @Revision 8 - [20/12/2012] Willy De Wilde
*    - site changes
* @Revision 7 - [24/11/2012] Willy De Wilde, Piotr Oleszczyk, Jan van Straaten
*    - site changes
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
*
site {url=teleman.pl|timezone=Europe/Sofia|maxdays=12|cultureinfo=pl-PL|charset=UTF-8|titlematchfactor=90}
site {ratingsystem=PL}
*
site {episodesystem=onscreen} *Enable for Onscreen Episode System
*site {episodesystem=xmltv_ns} *Enable for xmltv_ns Episode System
*
*http://www.teleman.pl/program-tv/stacje/TVP-1?date=2016-02-17
url_index {url|http://www.teleman.pl/program-tv/stacje/|channel|?date=|urldate|}
urldate.format {datestring|yyyy-MM-dd}
*
index_showsplit.scrub {multi|class="stationItems"|id="prog|</li>|</ul>}
*
index_start.scrub {single|<em>||<|<}
index_start.modify {calculate(format=utctime)}
index_title.scrub {regex||^.*<a [^>]*>(.*?)<||}
index_title.modify {remove|Premiera:}
*
*
index_category.scrub {regex||<p class="genre">(.*?)</p>||}
index_category.modify {remove(type=regex)|,.*?\d{4}}
index_category.modify {cleanup(style=name)}
*
index_subtitle.modify {addstart('index_category' ~ "mecz:")|'index_category'}
index_subtitle.modify {substring(type=regex)|'index_title' "\d+\:(.*?)\(\d+\)"}
index_title.modify {remove|'index_subtitle'}
index_title.modify {remove(type=regex)|\d+\:\(\d+\)}
index_category.modify {remove|'index_subtitle'}
index_category.modify {addstart('index_subtitle' ~ "mecz:")|Sport}
index_title.modify {remove(type=regex)|\d+\s\(\d+\)}
index_title.modify {remove(type=regex)|\s\(\d+\)}
*
index_urlshow {url|http://www.teleman.pl|<a href="||"|"}
*
title.scrub {regex||<h1 class="title.*?">(.*?)</h1>||}
title.modify {cleanup(tags="<"">")}
temp_1.modify {substring(type=regex)|'title' "\s\d+\s\(\d+\)\|\d+\:(?:.*?)\(\d+\)\|\:(?:.*?)\(\d+\)\|\s\(\d+\)"}
temp_1.modify {remove(type=regex)|\d+\:(.*?)\(\d+\)\|\:(.*?)\(\d+\)}
temp_2.scrub {regex||<h2 class="title">(.*?)\:.*?</h2>||}
temp_2.modify {addstart("")|'temp_1'}
episode.modify {set(pattern=" 'S1' ('E1')""odc. 'E1'/'Et1'""'S1':('E1')""sezon 'S1' odc. 'E1'"":('E1')""('E1')")|'temp_2'}
title.modify {remove|'episode'}
title.modify {remove|Premiera:}
title.modify {remove(type=regex)|\d+\:.*?\(\d+\)}
title.modify {remove(type=regex)|\s\(\d+\)}
titleoriginal.scrub {regex||<h2 class="orig-title">\((.*?)\)</h2>||}
*
productiondate.scrub {regex||<div id="showMainInfo">.*?(\d{4})||}
actor.scrub {multi|Występują:|">|</a>|</tr>} * actor name only alternative
director.scrub {multi|Reżyseria:|">|</a>|</tr>}
description.scrub {single|<h2>W tym odcinku</h2>||</div>|</div>}
description.scrub {single|<h2>Opis</h2>||</div>|</div>}
showicon.scrub {regex||<div id="showPhoto">.*?<img src="(.*?)"||}
country.scrub {multi(separator="/" includeblock=1)|<span class="sep">|<span>|</span>|}
*
description.modify {cleanup(tags="<"">")}
titleoriginal.modify {remove|Oglądaj w telewizji}
actor.modify {remove|'director'}

**  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _
**      #####  CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
* @auto_xml_channel_start
*index_site_id.scrub {multi|<h1>Program TV wg stacji</h1>|<a href="/program-tv/stacje/|">|</button></div></div>}
*index_site_channel.modify {cleanup(removeduplicates)}
*index_site_channel.scrub {multi|</div><a href="|">|</a>|</button></div></div>}
*index_site_id.modify {cleanup(removeduplicates)}
* @auto_xml_channel_end

Резултатът е следния:
Код:
<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version  V2.1 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
 <channel id="BBC Earth">
   <display-name lang="pl">BBC Earth</display-name>
   <url>http://www.teleman.pl</url>
 </channel>
 <programme start="20181013123000 +0300" stop="20181013130000 +0300" channel="BBC Earth">
   <title lang="pl">David Attenborough i cuda natury</title>
   <title lang="xx">David Attenborough's Natural Curiosities: Curious Minds</title>
   <desc lang="pl">Orangutany przez wiele lat uważano tylko za zręcznych naśladowców. Zmieniło to dopiero odkrycie, którego dokonali naukowcy na bagnach Sumatry. Ujawniło one potencjał tych zwierząt. Dokumentaliście przedstawiają nieznaną szerzej stronę wysp Galapagos. Wyjaśniają, dlaczego są one tak ważne dla poznania historii ewolucji(n)</desc>
   <credits>
     <director>Hilary Jeffkins</director>
     <actor>David Attenborough</actor>
   </credits>
   <category lang="pl">Serial Dokumentalny</category>
   <icon src="//media.teleman.pl/photos/470x265/David-Attenborough-i-Cuda-Natury-3.jpg" />
   <episode-num system="onscreen">S3 E2</episode-num>
 </programme>
 Въпросът ми е как мога да променя <title lang="xx"> да бъде <title lang="en">? (т.е. ЕПГ да ми показва английското заглавие, а не полското)

Благодаря!
Отговори


Съобщения в темата
RE: Разминаване на дата/час в ЕПГ на TVH - от Sei4etosei4eto - 13-10-2018, 11:40

Отваряне на: