Files
epg/siteini.pack/Bulgaria/vivacom.bg.ini
freearhey a597b11307 Init
2021-03-09 22:46:37 +03:00

88 lines
4.1 KiB
INI
Executable File

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: vivacom.bg
* @MinSWversion: V1.57
* @Revision 3 - [11/11/2016] Blackbear199
* - url_index change
* @Revision 2 - [19/12/2014] Francis De Paemeleere
* - new index page
* @Revision 1 - [03/06/2014] Jan van Straaten
* - completely new
* @Revision 0 - [13/02/2014] Francis De Paemeleere
* - creation
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
site {url=vivacom.bg|timezone=Europe/Sofia|maxdays=7|cultureinfo=bg-BG|charset=UTF-8|titlematchfactor=90}
url_index{url|http://www.vivacom.bg/bg/tv/programa/?date=|urldate|&page=##page##}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
urldate.format {datestring|yyyy-MM-dd}
*
scope.range{(urlindex)|end}
index_temp_1.modify {substring(type=regex)|'config_site_id' "^([^#]*)##"}
url_index.modify {replace|##page##|'index_temp_1'}
end_scope
*
index_variable_element.scrub {regex||^.*?<ol id="scroll-vertical">.*?(<li.*?</li>\s*)+||} * the channel list (names)
index_showsplit.scrub {regex||id="scroll-horizontal".*?(<ul.*?</ul>\s*)+||} * the channel list (shows)
*
scope.range {(splitindex)|end}
* first search the index of the channel we want to grab
index_temp_3.modify {clear}* index of the channel
index_temp_2.modify {clear}* index counter
index_temp_2.modify {addend|0}
index_temp_4.modify {substring(type=regex)|'config_site_id' "##(.$)$"}
index_temp_4.modify {set|title="'index_temp_4'"}
loop {(each 'index_temp_6' in 'index_variable_element' max=3000)|end}
index_temp_3.modify {addend('index_temp_6' ~ 'index_temp_4')|'index_temp_2'}
*index_temp_5.modify {addend('index_temp_6' ~ 'index_temp_4')|'index_temp_6'} ** currently can't use this in this scope
index_temp_2.modify {calculate(format=D0)|1 +}
end_loop
* we have the index of the channel.
* we will now select the channels on all the index pages
index_showsplit.modify {substring(type=element)|'index_showsplit' 'index_temp_3' 1/'index_temp_2'}
index_showsplit.modify {substring(type=regex)|<h3>.*?</li>} * now split into different channels
* just cleanup the logo url
*index_temp_5.modify {substring(type=regex)|src=\"([^\"]*)\"} ** currently can't use this in this scope
end_scope
*
index_start.scrub {single|<span>|| -|<}
index_stop.scrub {single|<span>| -|<|<}
index_title.scrub {regex||<h3>\s*([^<]*)\s*</h3>||}
index_description.scrub {regex||<p>\s*(.*?)\s*</p>||}
*
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
**
** @auto_xml_channel_start
*url_index{url|http://www.vivacom.bg/bg/tv/programa/?date=|urldate|&page=|subpage|}
*subpage.format {list(format=D0 step=1 count=21)|1}
*scope.range {(channellist)|end}
*index_site_id.scrub {|}
*index_temp_9.scrub {multi|<ol id="scroll-vertical">||</ol>|</ol>}
*index_temp_3.modify {set|1\|2\|3\|4\|5\|6\|7\|8\|9\|10\|11\|12\|13\|14\|15\|16\|17\|18\|19\|20\|21}
*index_temp_4.modify {set|0}
*loop{(each "index_temp_8" in 'index_temp_9')|end}
*index_temp_7.modify {substring(type=element)|'index_temp_3' 'index_temp_4' 1}
*index_temp_6.modify {substring(type=regex)|'index_temp_8' "title=\"([^\"]*)\""}
*index_temp_6.modify {addstart|'index_temp_7'##}
*index_temp_6.modify {replace|\||###}
*index_temp_1.modify {addend|'index_temp_6'###}
*index_temp_5.modify {substring(type=regex)|'index_temp_8' "title=\"([^\"]*)\""}
*index_temp_5.modify {replace|\||###}
*index_temp_2.modify {addend|'index_temp_5'###}
*index_temp_4.modify {calculate(format=F0)|1 +}
*end_loop
*index_site_id.modify {addstart|'index_temp_1'}
*index_site_id.modify {replace|###|\|}
*index_site_id.modify {remove(type=element)|-1 1}
*index_site_channel.modify {addstart|'index_temp_2'}
*index_site_channel.modify {replace|###|\|}
*index_site_channel.modify {remove(type=element)|-1 1}
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
*end_scope
** @auto_xml_channel_end