52 lines
2.6 KiB
INI
Executable File
52 lines
2.6 KiB
INI
Executable File
**------------------------------------------------------------------------------------------------
|
|
* @header_start
|
|
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
|
|
* @Site: n4.is
|
|
* @MinSWversion: 1.1.1/56.14
|
|
* @Revision 0 - [25/02/2016] Jan van Straaten
|
|
* - creation
|
|
* @Remarks: single channel Iceland
|
|
* @header_end
|
|
**------------------------------------------------------------------------------------------------
|
|
|
|
site {url=n4.is|timezone=Atlantic/Reykjavik|maxdays=14.1|cultureinfo=is-IS|charset=UTF-8|titlematchfactor=90|nopageoverlaps}
|
|
url_index{url|http://www.n4.is/static/files/dagskra-xml/dagskra_n4.xml}
|
|
* http://www.n4.is/static/files/dagskra-xml/dagskra_n4.xml
|
|
url_index.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the index pages
|
|
scope.range {(splitindex)|end}
|
|
index_showsplit.scrub {regex()||<event event-id.+?</event>||}
|
|
*index_showsplit.modify {replace(debug)|\||\n\n\|} *testing only
|
|
* contains all shows for a 14 day period not necessarily starting today
|
|
* remove the ones already past
|
|
index_temp_3.modify {calculate(format=date,vba)|'now'} *vba daynumber of today
|
|
loop {(each "index_temp_1" in 'index_showsplit')|end}
|
|
* extract the date
|
|
index_temp_2.modify {substring(type=regex)|'index_temp_1' "start-time=\"(\d{4}-\d{2}-\d{2})"}
|
|
index_temp_2.modify {replace|-|/} *standard separator /
|
|
index_temp_2.modify {calculate(format=date,vba)} * vba day number
|
|
* keep only today or later
|
|
index_temp_6.modify {addend('index_temp_2' >= 'index_temp_3')|'index_temp_1'####}
|
|
end_loop
|
|
index_temp_6.modify {replace|####|\n\n\|} * make multi
|
|
index_showsplit.modify {set()|'index_temp_6'}
|
|
end_scope
|
|
scope.range {(indexshowdetails)|end}
|
|
index_start.scrub {regex(pattern="yyyy-MM-dd HH:mm:ss")||start-time="(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:00)"||}
|
|
index_title.scrub {regex()||<event-name>(.+?)</event-name>||}
|
|
index_description.scrub {regex||<short-description>(.+?)</short-description>||}
|
|
index_temp_1.scrub {regex||<extended-description>(.+?)</extended-description>||}
|
|
index_description.modify {addend(not ~ 'index_temp_1')| 'index_temp_1'}
|
|
end_scope
|
|
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
|
|
**
|
|
** @auto_xml_channel_start
|
|
** single channel n4
|
|
*index_site_id.scrub {multi|} * dummy scrub required
|
|
*index_site_id.modify {set|n4}
|
|
*index_site_channel.modify {set|N4}
|
|
*scope.range {(channellist)|end}
|
|
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
|
|
*end_scope
|
|
** @auto_xml_channel_end
|