Files
epg/siteini.pack/China/fr.cntv.cn.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

86 lines
4.5 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: fr.cntv.cn
* @MinSWversion: V1.1.1/49
* @Revision 0 - [30/05/2013] Jan van Straaten
* - Creation
* @Remarks: your_remarks
* - Only generic details
* @header_end
**------------------------------------------------------------------------------------------------
*
site {url=site.com|timezone=UTC+00:00|maxdays=7|cultureinfo=fr|charset=utf-8|titlematchfactor=0}
site {firstday=0123456}
url_index{url|http://fr.cntv.cn/schedule/01/index.shtml}
* this is a weekly indexpage from monday to monday
* it lists the shows in hour rows all days of the week in it.
* each row has a shared starttime at the beginning but the individual shows in the row have no starttime of its own
* we need to add this starttime o each show before we finish showsplit
scope.range {(splitindex)|end}
index_showsplit.scrub {multi()|<tr bgcolor="#ffffff">\r\n<td|||<tbody><tr> }
index_showsplit.modify {replace|<td align="center"|\|}
index_showsplit.modify {replace|align="center" bgcolor="#FFCC99">|\|}
index_temp_1.modify {substring(type=element)|'index_showsplit' 0 1/8} * the row headers with the start times
index_temp_1.modify {remove| width="6%"} * some cleaning
index_temp_1.modify {remove()|<td width="11%"} * some cleaning
index_temp_1.modify {remove()| } * some cleaning
index_temp_1.modify {replace|\n|\|} * split in two first local time second utc time
index_temp_1.modify {substring(type=element)|1 1/2} * only the elements with the utc start time
index_showsplit.modify {remove(type=element)|0 1/8} * removes alle the rowheaders
index_showsplit.modify {cleanup(tags="<td bgcolor""</tr>"}
index_temp_6.modify {addstart|'index_showsplit'}
index_showsplit.modify {clear}
* add the utc start times to the index shows
index_temp_2.modify {calculate(type=element format=F0)|'index_temp_6' #} * number of elements in index_showsplit
index_temp_4.modify {calculate(type=element format=F0)|'index_temp_1' #} * number of elements in index_temp_1 the start times
loop {('index_temp_4' > "0" max=100)|end}
index_temp_2.modify {calculate(format=F0)|7 -} * start index of the week row
index_temp_4.modify {calculate(format=F0)|1 -} * index of the actual element with the start time
index_temp_5.modify {substring(type=element)|'index_temp_1' 'index_temp_4' 1} * the start time element
index_temp_3.modify {substring(type=element)|'index_temp_6' 'index_temp_2' 7} * the 7 shows with tha actual start time
index_temp_3.modify {addstart|'index_temp_5'@@} * add the start time
index_temp_3.modify {replace|\||####}
index_showsplit.modify {addstart|'index_temp_3'####}
end_loop
index_showsplit.modify {replace|####|\|} * the index shows with the start time added.
* reorder the index_shows in days
index_temp_6.modify {substring(type=element)|'index_showsplit' 0} * copy all index shows into temp_6 without the need to clear first
index_showsplit.modify {clear}
index_temp_1.modify {clear}
index_temp_1.modify {calculate(format=F0)} * set to 0
loop {('index_temp_1' < "7" max=6)|end}
index_temp_5.modify {substring(type=element)|'index_temp_6' 'index_temp_1' 1/7} * all shows of one day
index_temp_5.modify {replace|\||####} * make single
index_showsplit.modify {addend()|####'index_temp_5'}
index_temp_1.modify {calculate(format=F0)|1 +}
end_loop
index_showsplit.modify {replace|####|\|} * the finished showsplit
end_scope
index_urlshow {url()||<a href="||">|">}
*
index_start.scrub {single|<fontsize="1">||</font>|</div>}
index_title.scrub {single|<a href="|">|</a>|</font>}
index_title.modify {cleanup(tags="<"">")}
index_title.modify {remove|">}
*
title.scrub {single|<title>||</title>|</title>}
title.modify {remove|- CCTV Francais}
title.modify {remove|- Francais_CCTV.com}
title.modify {remove|- CCTV.com
title.modify {remove|- CNTV Francais
title.modify {cleanup}
*
description.scrub {single|<span class="mh_title">Présentation|<p class="fs_14 color_777">|</p>|<strong>}
description.scrub {single|<span class="mh_title">Présentation|<h4>|</h4>|</h4>}
description.modify {cleanup(tags="<"">")}
*
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
* a fixed single channel with a dummy site_id
*index_site_id.scrub {multi|}
*index_site_id.modify {addstart|xx}
*index_site_channel.modify {addstart|CNTV Français}
** @auto_xml_channel_end