**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: tv.yandex.ru * @MinSWversion: V1.57 * @Revision 5 - [08/11/2017] Blackbear199 * - added UA and TR to channels.xml creation * @Revision 4 - [30/10/2017] Blackbear199 * - site changes * @Revision 3 - [05/04/2017] Blackbear199 * - site changes * @Revision 2 - [28/07/2016] Blackbear199 * - title match fix * @Revision 1 - [25/07/2016] Blackbear199 * - added subtitle * - added country * - added urlchannellogo * - added showicon * - rewrote season/episode to version 56.25+ format. * - set desired output,onscreen(S5 E9/10) or xmltv_ns(4.8/9.) on site{...} line.default onscreen. * @Revision 0 - [02/03/2016] Blackbear199 * - creation * @Remarks: your_remarks * @header_end **------------------------------------------------------------------------------------------------ site {url=tv.yandex.ru|timezone=UTC|maxdays=6|cultureinfo=ru-RU|charset=UTF-8|titlematchfactor=90|allowpageoverlaps} site {ratingsystem=RU|episodesystem=onscreen} * url_index{url|https://tv.yandex.ru/##region##/channels/##channel##?date=|urldate|&period=all-day} url_index.headers {customheader=Accept-Encoding=gzip,deflate} urldate.format {datestring|yyyy-MM-dd} * scope.range{(urlindex)|end} global_temp_1.modify {substring(type=regex)|'config_site_id' "^(\d+)##"} global_temp_2.modify {substring(type=regex)|'config_site_id' "##(\d+)$"} url_index.modify {replace|##region##|'global_temp_1'} url_index.modify {replace|##channel##|'global_temp_2'} end_scope * index_urlchannellogo {url(scope=datelogo)|https:|class="image image_size_m channel-header__image">|src="|"/>|} * index_showsplit.scrub {multi|"events":[{||}]}|}]}} index_showsplit.modify {replace|\},\{|\|} * index_urlshow {url|https://tv.yandex.ru|"url":"||",|",} index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * index_temp_1.scrub {regex||"start":"\d{4}-\d{2}-\d{2}T\d{1,2}:\d{2}:\d{2}([-+]\d{2}:\d{2})"||} index_start.scrub {regex||"start":"(\d{4}-\d{2}-\d{2}T\d{1,2}:\d{2}:\d{2})[-+]\d{2}:\d{2}"||} index_stop.scrub {regex||"finish":"(\d{4}-\d{2}-\d{2}T\d{1,2}:\d{2}:\d{2})[-+]\d{2}:\d{2}"||} index_title.scrub {single|"channel":null,"title":"||","|","} index_subtitle.scrub {single|"episodeTitle":"||","|","} * scope.range{(indexshowdetails)|end} index_start.modify {calculate(format=date,unix)} index_stop.modify {calculate(format=date,unix)} index_temp_2.modify {substring(type=char)|'index_temp_1' 0 1} index_temp_1.modify {remove(type=char)|0 1} index_temp_1.modify {calculate(format=F0)|3600 *} index_start.modify {calculate('index_temp_2' "-" format=F0)|'index_start' 'index_temp_1' +} index_start.modify {calculate('index_temp_2' "+" format=F0)|'index_start' 'index_temp_1' -} index_stop.modify {calculate('index_temp_2' "-" format=F0)|'index_stop' 'index_temp_1' +} index_stop.modify {calculate('index_temp_2' "+" format=F0)|'index_stop' 'index_temp_1' -} index_title.modify {cleanup(style=jsondecode)} index_subtitle.modify {cleanup(style=jsondecode)} index_subtitle.modify {clear('index_title')} * index_episode.modify {substring(type=regex pattern="Сезон 'S1'. 'E1'/'Et1'""Сезон 'S1'. 'E1'""'E1'/'Et1'""'E1'")|'index_title' "\s((?:Сезон\s\d+\.\s)?(?:\d+-я\s[и-]\s)?\d+-я\sсери[ия])"} index_episode.modify {replace|-я и |/} index_episode.modify {replace|-я - |/} index_episode.modify {remove(type=regex)|-я сери[ия]} index_title.modify {remove(type=regex)|\.*\s(?:Сезон \d+\.\s)?(?:\d+-я\s[и-]\s)?\d+-я\sсери[ия](?:\s-*\s*\".*?\")?} * index_subtitle.modify {substring(type=regex)|"\s-\s\"(.*?)\""} index_category.scrub {single|"type":{|"name":"|"|}} end_scope * title.modify {addstart|'index_title'} *index_title and details title often different description.scrub {multi(exclude="Трейлер")||"/>} description.modify {cleanup} director.scrub {multi|Режиссёр|||} actor.scrub {multi|В ролях|class="program-persons__name" itemProp="name">||} presenter.scrub {multi|Ведущие|||} presenter.scrub {multi|Ведущий|||} rating.scrub {single||} rating.modify {cleanup(tags="<"">")} starrating.scrub {single|Рейтинг КиноПоиска|">||} productiondate.scrub {regex||Страна и год[^>]+>.+?,\s(\d{4})||} country.scrub {regex||Страна и год[^>]+>(.+?)(?:,\s\d{4})?||} country.modify {replace|, |\|} showicon.scrub {single|