**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: tv.so-net.ne.jp
* @MinSWversion: V3.0.0
* @Revision 3 - [09/09/2020] Blackbear199
* - detail title fix
* @Revision 2 - [15/04/2020] Blackbear199
* - add region for local to channel xml
* @Revision 1 - [20/11/2018] Blackbear199
* - urlindex/channels.xml fix
* @Revision 0 - [17/10/2016] Blackbear199
* - creation
* @Remarks: for Terrestrial(地上波),BS1,BS2,BS3,BS4
* @header_end
**------------------------------------------------------------------------------------------------
site {url=tv.so-net.ne.jp|timezone=Asia/Tokyo|maxdays=7|cultureinfo=ja-JP|charset=UTF-8|titlematchfactor=90}
site {ratingsystem=JP|episodesystem=onscreen}
*
url_index{url|https://tv.so-net.ne.jp/chart/##system##&head=|urldate|0600&span=24&chartWidth=950&cellHeight=5&sticky=false&descriptive=true&iepgType=1&buttonType=0}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
*
urldate.format {datestring|yyyyMMdd}
*
scope.range{(urlindex)|end}
global_temp_1.modify {substring(type=regex)|'config_site_id' "^([^#]*##\d+)##\d+$"}
global_temp_1.modify {replace|##|.action?group=}
url_index.modify {replace|##system##|'global_temp_1'}
end_scope
*
global_temp_2.modify {substring(type=regex)|'config_site_id' "##(\d+)$"}
index_showsplit.scrub {multi(includeblock="id="cell-station-top-'global_temp_2'"")|
"}
index_temp_1.modify {substring(type=regex)|'index_showsplit' "schedule-head-(\d+)\""}
index_temp_1.modify {cleanup(removeduplicates span=1 link="index_showsplit")}
*index_showsplit.modify {(debug)}
end_scope
*
index_urlshow {url|https://tv.so-net.ne.jp|
|}
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate}
*
index_start.scrub {single(pattern="yyyyMMddHHmm")|schedule-head-||"|"}
index_title.scrub {single|||}
*
index_title.modify {remove|}
index_title.modify {remove(type=regex)|"\s*(?:\[[^\]]*\]\|「.*?」\|【.*?】\|(?:シーズン\|S)?\d*\s*#\d+)\s*"}
index_title.modify {remove(type=regex)|"(シーズン\d+)(?:\s*#\d+)?"}
*
title.scrub {single||- |
| }
description.scrub {single|番組概要|| |}
category.scrub {multi(include="genres[0]" separator=" , ")|| ||}
*
title.modify {remove(type=regex)|"\[[^\]]*\]"}
subtitle.modify {substring(type=regex)|'title' "[「【](.*?)[」】]"}
subtitle.modify {clear(~ "シーズン")}
title.modify {remove(type=regex)|"[「【].*?[」】]"}
description.modify {cleanup(tags="<"">")}
category.modify {cleanup(tags="<"">")}
temp_2.modify {substring(type=regex)|'description' "[「【](.*?)[」】]"}
temp_2.modify {clear(~ "シーズン")}
description.modify {remove(type=regex)|"[「【].*?[」】]"}
episode.modify {substring(pattern="シーズン'S1' #'E1'""S'S1' #'E1'""#'E1'" type=regex)|'title' "(?:シーズン\|S)?\d*\s*#\d+"}
temp_1.modify {substring(type=regex)|'title' "(シーズン\d+)\s*#\d+"}
episode.modify {clear('temp_1' not "")}
title.modify {remove('episode' not "")|'episode'}
title.modify {remove('temp_1' not "")|'temp_1'}
temp_1.modify {remove|(}
temp_1.modify {remove|)}
loop{('epsisode' "" max=1)|1}
episode.modify {set('temp_1' not "")|'temp_1'}
loop{('subtitle' "" max=1)|1}
subtitle.modify {set('temp_2' not "")|'temp_2'}
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### REGION FILE CREATION (only to create the xxx-channel.xml file)
**
* for creation region local for terrestrial
** @auto_xml_channel_start
*url_index {url|https://tv.so-net.ne.jp/chart/23.action?group=10}
*index_site_id.scrub {multi| |