**------------------------------------------------------------------------------------------------ * @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|= '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|||} index_subtitle.scrub {single|||} index_description.scrub {single|||} index_actor.scrub {multi||||} index_director.scrub {multi||||} index_writer.scrub {multi||||} index_producer.scrub {multi||||} index_presenter.scrub {multi||||} index_productiondate.scrub {single||||} index_category.scrub {multi|||} index_starrating.scrub {single|||} index_episode.scrub {single||||} *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 : Первый канал ** into this : Первый канал ** this is done with the new argument alloc (V1.1.1/45) **@auto_xml_channel_start *index_site_channel.scrub {multi(alloc=display_name)|||} * default allocation xmltv_id and channel_name *index_site_id.scrub {multi(alloc=site_id, xmltv_id)||} * default allocation site_id ** @auto_xml_channel_end