105 lines
5.4 KiB
INI
Executable File
105 lines
5.4 KiB
INI
Executable File
**------------------------------------------------------------------------------------------------
|
|
* @header_start
|
|
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
|
|
* @Site: cmore.fi
|
|
* @MinSWversion:
|
|
* @Revision 1 - [20/02/2016]
|
|
* - creation
|
|
* @Remarks:
|
|
* @header_end
|
|
**------------------------------------------------------------------------------------------------
|
|
site {url=press.cmore.fi|timezone=EET|maxdays=28|cultureinfo=fi-FI|charset=UTF-8|titlematchfactor=90|episodesystem=xmltv_ns}
|
|
url_index{url|http://press.cmore.fi/export/xml/|urldate|/|urldate|?channelId=|channel|}
|
|
url_index.headers {accept=text/html,application/xhtml+xml,application/xml|contenttype=text/xml}
|
|
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
|
|
urldate.format {datestring|yyyy-MM-dd}
|
|
index_showsplit.scrub {regex||<Schedule.+?</Schedule>||}
|
|
index_start.scrub {regex||CalendarDate="(.+?)"||}
|
|
index_stop.scrub {regex||NextStart="(.+?)"||}
|
|
index_title.scrub {regex|| Title="(.+?)" \w+=||}
|
|
index_titleoriginal.scrub {regex||OriginalTitle="(.*?)" \w+=||}
|
|
index_subtitle.scrub {regex||EpisodeTitle="(.*?)" \w+=||}
|
|
index_subtitle.modify {remove(type=regex)|(?i)^\d+[. ]*jakso[:. ]*}
|
|
index_description.scrub {regex||<Medium>(.*?)</Medium>||}
|
|
index_category.scrub {regex||Type="[^"]*" Category="(.*?)" \w+=||}
|
|
index_category.scrub {regex||Genre="(.*?)" \w+=||}
|
|
index_category.modify {replace(type=regex)|(?i)Documentary|Dokumentti}
|
|
index_category.modify {replace(type=regex)|(?i)Event|Urheilu}
|
|
index_category.modify {replace(type=regex)|(?i)Film|Elokuva}
|
|
index_category.modify {replace(type=regex)|(?i)Game|Urheilu}
|
|
index_category.modify {replace(type=regex)|(?i)Magazine|Sarja}
|
|
index_category.modify {replace(type=regex)|(?i).+Series|Sarja}
|
|
index_country.scrub {regex||ProductionCountry="(.*?)"||}
|
|
index_productiondate.scrub {regex||ProductionYear="(\d*)"||}
|
|
index_actor.scrub {regex||Actors="(.*?)"||}
|
|
index_actor.modify {replace|,|\|}
|
|
index_director.scrub {regex||Directors="(.*?)"||}
|
|
index_director.modify {replace|,|\|}
|
|
index_rating.scrub {regex||Rating="(.*?)"||}
|
|
index_rating.modify {replace|Unrated|S}
|
|
index_rating.modify {replace|GREEN|S}
|
|
index_rating.modify {replace|TURQUOISE|10}
|
|
index_rating.modify {replace|BLUE|12}
|
|
index_rating.modify {replace|ORANGE|16}
|
|
index_showicon.scrub {regex||<Image Id="(.*?)" Category="Primary"||}
|
|
index_showicon.modify {addstart('index_showicon' not = "")|http://cdn01.img.cmore.se/}
|
|
index_showicon.modify {addend('index_showicon' not = "")|/121.img}
|
|
*Season & episode numbers
|
|
*index_temp_1 = season
|
|
*index_temp_2 = episode
|
|
*index_temp_3 = episode total
|
|
index_temp_1.scrub {regex||SeasonNumber="(\d*)"||}
|
|
index_temp_2.scrub {regex||EpisodeNumber="(\d*)"||}
|
|
index_temp_3.scrub {regex||NumberOfEpisodes="(\d*)"||}
|
|
index_temp_1.modify {calculate('index_temp_1' not = "" format=F0)|1 -}
|
|
index_temp_2.modify {calculate('index_temp_2' not = "" format=F0)|1 -}
|
|
index_temp_3.modify {calculate('index_temp_3' not = "" format=F0)|1 -}
|
|
index_temp_3.modify {addstart('index_temp_3' not = "")|/}
|
|
index_temp_2.modify {addend('index_temp_2' not = "")|'index_temp_3'}
|
|
index_episode.modify {addend|'index_temp_1'.'index_temp_2'.}
|
|
index_episode.modify {remove(type=regex)|^[\. ]+$}
|
|
index_temp_1.modify {clear}
|
|
index_temp_2.modify {clear}
|
|
index_temp_3.modify {clear}
|
|
index_temp_4.scrub {regex||AlsoAvailableInHD="(.*?)"||}
|
|
index_temp_4.modify {replace|false|SD}
|
|
index_temp_4.modify {replace|true|HD}
|
|
index_temp_5.scrub {regex||AlsoAvailableIn3D="(true)"||}
|
|
index_temp_5.modify {replace|true|, 3D}
|
|
index_videoquality.modify {addend|'index_temp_4'}
|
|
index_videoquality.modify {addend|'index_temp_5'}
|
|
index_videoquality.modify {remove(type=regex)|^[, ]+}
|
|
index_temp_4.modify {clear}
|
|
index_temp_5.modify {clear}
|
|
*Edit subtitle field for movies (original name, country, year)
|
|
*and use the original title for tv shows without episode titles
|
|
index_temp_6.modify {addstart|('index_titleoriginal'}
|
|
index_temp_6.modify {addend('index_country' not = "")|, 'index_country'}
|
|
index_temp_6.modify {addend('index_productiondate' not = "")|, 'index_productiondate'}
|
|
index_temp_6.modify {addend('index_temp_6' not = "")|)}
|
|
index_temp_6.modify {clear('index_category' not ~ "elokuva")}
|
|
index_subtitle.modify {addend('index_subtitle' = "")|'index_temp_6'}
|
|
index_subtitle.modify {addend('index_subtitle' = "")|'index_titleoriginal'}
|
|
index_temp_6.modify {clear}
|
|
index_titleoriginal.modify {clear}
|
|
*Add "premiere" and "dubbed" info in description
|
|
index_temp_7.scrub {regex||IsDubbed="(true)"||}
|
|
index_temp_7.modify {replace|true| Puhuttu suomeksi.}
|
|
index_temp_8.scrub {regex||IsPremiere="(true)"||}
|
|
index_temp_8.modify {replace|true| Ensiesitys.}
|
|
index_description.modify {addend|'index_temp_7'}
|
|
index_description.modify {addend|'index_temp_8'}
|
|
index_description.modify {remove(type=regex)|^\s+}
|
|
index_temp_7.modify {clear}
|
|
index_temp_8.modify {clear}
|
|
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
|
|
**
|
|
** @auto_xml_channel_start
|
|
*url_index{url|http://press.cmore.fi/grids}
|
|
*index_site_channel.scrub {regex||<option value="\d+" class="[^"]+">(.+?)</option||}
|
|
*index_site_id.scrub {regex||<option value="(\d+)" class="[^"]+">||}
|
|
*scope.range {(channellist)|end}
|
|
*index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
|
|
*end_scope
|
|
** @auto_xml_channel_end |