Files
epg/siteini.pack/Malaysia/tm.com.my.xmltv_ns.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

117 lines
6.0 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: www.tm.com.my
* @MinSWversion: 1.1.1/49
* @Revision 0 - [11/05/2013] Jan van Straaten
* - creation
* @Remarks: Variant of tm.com.my.ini with xmltv_ns episode format
* @header_end
**------------------------------------------------------------------------------------------------
*
site {url=www.tm.com.my|timezone=UTC+00:00|maxdays=7|cultureinfo=en-GB|charset=utf-8|titlematchfactor=90|firstshow=1}
site {episodesystem=xmltv_ns}
url_index{url|http://www.tm.com.my/hypptv/Pages/livetv.aspx?####&Date=|urldate}
urldate.format {datestring|M/d/yyyy}
* #### in url_index will be replaced by the Cat= number to reduce the number of channels in the index_page
* this Cat is the second word in config_site_id
scope.range {(urlindex)|end}
index_variable_element.modify {clear}
index_variable_element.modify {addstart|"'config_site_id'"}
index_variable_element.modify {substring(type=word)|-1}
index_variable_element.modify {remove|"}
url_index.modify {replace|####|'index_variable_element'}
end_scope
* to select the correct channel the first word of the config_site_id is used
scope.range {(datelogo)|end}
index_variable_element.modify {clear}
index_variable_element.modify {addstart|"'config_site_id'"}
index_variable_element.modify {substring(type=word)|0 1}
index_variable_element.modify {remove|"}
end_scope
*
index_showsplit.scrub {multi|<ul id="times'index_variable_element'"|$StartTimeHidden"||</ul>}
* remove the ovelaps on the indexpages
* because they are not completely equal we use the first twoo sentences
scope.range {(splitindex)|end}
index_showsplit.modify {replace|\n|.} * creates the sentences
index_temp_2.modify {substring(type=sentence)|'index_showsplit' 0 2} * get the first 2 sentences
* loop to get rid of the remaining different shownumber
index_temp_1.modify {calculate(format=D2)|0 *}
loop {(max=100)|end}
index_temp_2.modify {replace|Child_ctl'index_temp_1'|####}
index_temp_2.modify {replace|Child$ctl'index_temp_1'|####}
index_temp_1.modify {calculate(format=D2)|1 +}
end_loop
* remove the 'duplicates' through a link
index_temp_2.modify {cleanup(removeduplicates link="index_showsplit")}
index_showsplit.modify {replace|.|\n} * back to paragraphs
end_scope
**
scope.range {(indexshowdetails)|end}
index_start.scrub {single|StartTimeHidden"|value="|" />|<input>}
index_start.modify {calculate(format=time)}
index_stop.scrub {single|EndTimeHidden"|value="|" />|<input>}
index_stop.modify {calculate(format=time)}
index_title.scrub {single(separator=":" include=last)|<div class="hypptv_schedule_timeslot_popup_container">|popup_title">|</div>|</li>}
index_title.modify {cleanup}
index_description.scrub {single|popup_title"|popup_description">|</div>|</li>}
index_description.modify {cleanup}
index_temp_1.modify {substring(type=word)|'index_description' 0 3}
index_temp_2.modify {calculate('index_temp_1' ~~ "EP" type=char format=F0)|'index_temp_1' "-" -@}
index_temp_2.modify {calculate('index_temp_1' not ~~ "EP" format=F0)}
index_episode.modify {substring('index_temp_2' not "0" type=char)|'index_description' 0 'index_temp_2'}
index_description.modify {remove|'index_episode'-}
index_episode.modify {calculate(not "" format=F0)|1 -}
index_episode.modify {addstart(not "")|.}
index_episode.modify {addend(not "")|.}
index_temp_1.modify {calculate(type=char format=F0)|'index_title' "(Season" @}
index_temp_2.modify {substring('index_temp_1' not "-1" type=char)|'index_title' 'index_temp_1'} * like (Season 4)
index_title.modify {remove|'index_temp_2'}
index_temp_2.modify {remove()|(}
index_temp_2.modify {remove|)}
index_temp_2.modify {calculate(not "" format=F0)|1 -}
index_episode.modify {addstart('index_temp_2' not "")|'index_temp_2'} * the 'xmltv_ns' version of the episode
index_description.modify {remove|'index_title'}
index_description.modify {cleanup}
index_category.scrub {single(separator=":" exclude=last)|<div class="hypptv_schedule_timeslot_popup_container">|popup_title">|</div>|</li>}
end_scope
*
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*url_index{url|http://www.tm.com.my/hypptv/Pages/livetv.aspx?Cat=1}
** the complexity here is to add the Cat number, therefore the 7 Cat blocks are separated first
** the site_id and the site_channel are extracted through a loop which steps through each Cat block separately
*scope.range {(channellist)|end}
*index_site_id.scrub {||||}
**the 7 cat blocks
*index_temp_6.scrub {multi|<div class="hypptv_scheduleselection_dropdown_channel"|<a id="ctl02_clusterLink||</ul> <!-- dropdown list -->}
*index_temp_1.modify {calculate(type=element format=F0)|'index_temp_6' #}
+loop {('index_temp_1' > "0" max=10)|end}
*index_temp_1.modify {calculate(format=F0)|1 -}
*index_temp_2.modify {substring(type=element)|'index_temp_6' 'index_temp_1' 1} * the cat block
*index_temp_3.modify {clear}
*index_temp_3.modify {addstart|'index_temp_2'}
*index_temp_3.modify {replace()|channel_content_description_number">|\|}
*index_temp_3.modify {substring(type=char)|0 3}
*index_temp_3.modify {remove(type=element)|0 1}
*index_temp_5.modify {calculate(format=F0)|'index_temp_1' 1 +}
*index_temp_3.modify {addend| Cat='index_temp_5'}
*index_temp_3.modify {replace|\||####}
*index_site_id.modify {addstart|####'index_temp_3'}
**
*index_temp_4.modify {clear}
*index_temp_4.modify {addstart|'index_temp_2'}
*index_temp_4.modify {replace()|channel_content_description_title">|\|}
*index_temp_4.modify {remove(type=element)|0 1}
*index_temp_4.modify {substring(type=char)|0 32}
*index_temp_4.modify {cleanup}
*index_temp_4.modify {replace|\||####}
*index_site_channel.modify {addstart|####'index_temp_4'}
*end_loop
+index_site_id.modify {replace|####|\|}
*index_site_channel.modify {replace|####|\|}
*end_scope
** @auto_xml_channel_end