Files
epg/siteini.pack/Russia/teleguide.info.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

104 lines
5.4 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: teleguide.info
* @MinSWversion: 1.1.1/45
* - uses the new command select
* @Revision 0 - [07/02/2013] Jan van Straaten
* - creation
* @Remarks: Russian xmltv feed
* @header_end
**------------------------------------------------------------------------------------------------
*
site {url=teleguide.info|timezone=UTC+04:00|maxdays=7.1|cultureinfo=ru-RU|charset=utf-8|titlematchfactor=90}
site {compression=gzip|firstshow=1|keepindexpage}
url_index{url()|http://www.teleguide.info/download/|subpage|/xmltv.xml.gz}
url_index.headers {method=GET|contenttype=application/zip}
subpage.format {list|old|new3}
*this week mo-su:
*http://www.teleguide.info/download/old/xmltv.xml.gz
*next week mo-su:
*http://www.teleguide.info/download/new3/xmltv.xml.gz
* changefile schedule:
*zo 3/2 old 28/1 - 3/2 new 4/2 - 10/2
*ma 4/2 old 28/1 - 3/2 new 4/2 - 10/2
*di 5/2 old 28/1 - 3/2 new 4/2 - 10/2
* because the change file update schedule is unpredictable we download both weeks
* we force that using the subpage and maxdays=7.1
scope.range {(splitindex)|end}
index_variable_element.modify {addstart()|channel="'config_site_id'""}
index_showsplit.scrub {multi()||||} *this copies the whole page into showsplit
index_showsplit.modify {replace|<programme|\|}
*
* select ~ contains ~~ contains case sens /= startwith /== startwith case sens =/ endwith ==/
index_showsplit.modify {select|'index_variable_element' ~~}
* select the shows of today and later
index_temp_1.modify {calculate(type=element format=F0)|'index_showsplit' #}
index_temp_3.modify {calculate(format=date,yyyyMMdd)|'now'}
index_temp_4.modify {calculate(format=date,yyyyMMdd)|'now' 14:00 +} *add 14 days as start value
loop {('index_temp_4' >= 'index_temp_3' max=500)|end}
index_temp_1.modify {calculate(format=F0)|1 -}
index_temp_2.modify {substring(type=element)|'index_showsplit' 'index_temp_1' 1} * the show to inspect
index_temp_4.modify {substring(type=char)|'index_temp_2' 8 8} * the start time date, like 20130128
index_temp_6.modify {addstart|'index_temp_2'####}
end_loop
index_showsplit.modify {clear}
index_showsplit.modify {addstart|'index_temp_6'}
index_showsplit.modify {replace()|####|\|}
end_scope
*
index_start.scrub {single|start="||"|>}
index_stop.scrub {single|stop="||"|>}
index_title.scrub {single|<title|>|</title>|</title>}
index_subtitle.scrub {single|<sub-title|>|</sub-title>|</sub-title>}
index_description.scrub {single|<desc|>|</desc>|</desc>}
index_actor.scrub {multi|<actor>||</actor>|</actor>}
index_director.scrub {multi|<director>||</director>|</director>}
index_writer.scrub {multi|<writer>||</writer>|</writer>}
index_producer.scrub {multi|<producer>||</producer>|</producer>}
index_presenter.scrub {multi|<presenter>||</presenter>|</presenter>}
index_productiondate.scrub {single|<year>||</year>|</year>}
index_category.scrub {multi|<category|>|</category>|</category>}
index_starrating.scrub {single|<star-rating>|<value>|</value></star-rating>}
index_episode.scrub {single|<episode-num>||</episode-num>|</episode-num>}
*index_premiere.scrub {single||||}
*index_previousshown.scrub {single||||}
*
*operations
scope.range {(indexshowdetails)|end}
* extraxt times
*start="20120922004200" stop="20120922021200"
index_start.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_start' 0 2} * the hours
index_start.modify {substring(type=char)|2 2} * the minutes
index_start.modify {addstart()|'index_temp_1':}
index_stop.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_stop' 0 2} * the hours
index_stop.modify {substring(type=char)|2 2} * the minutes
index_stop.modify {addstart()|'index_temp_1':}
*
index_description.modify {cleanup}
* extract actor from description
* disabled because the separator '... ' in the description is not consequently used
*index_temp_5.modify {addstart|'index_description'}
*index_temp_5.modify {replace()|... |\|}
*index_actor.modify {substring('index_description' ~~ "... " type=element)|'index_temp_5' -1 1}
*index_description.modify {remove|... 'index_actor'}
*index_actor.modify {replace|, |\|}
end_scope
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** this channel file has a differnet structure
** the reason is that xmltv_id is also used in the running command window to list the channelname that is being grabbed
** unfortunately a command window cannot display crylic characters
** therefor we have to make site_id (which is a number) equal to the xmltv id
** like so :
** change this : <channel update="i" site="teleguide.info" site_id="1" xmltv_id="Первый канал">Первый канал</channel>
** into this : <channel update="i" site="teleguide.info" site_id="1" xmltv_id="1">Первый канал</channel>
** this is done with the new argument alloc (V1.1.1/45)
**@auto_xml_channel_start
*index_site_channel.scrub {multi(alloc=display_name)|<display-name|">|</display-name>|</channel>} * default allocation xmltv_id and channel_name
*index_site_id.scrub {multi(alloc=site_id, xmltv_id)|<channel id="||">|</channel>} * default allocation site_id
** @auto_xml_channel_end