Update tv.yandex.ru.config.js

This commit is contained in:
freearhey 2021-03-16 03:00:05 +03:00
parent ecdc0b42a7
commit 1265ef0c74
1 changed files with 2 additions and 1 deletions

View File

@ -6,7 +6,8 @@ module.exports = {
cookie: cookie:
'yandexuid=8747786251615498142; Expires=Tue, 11 Mar 2031 21:29:02 GMT; Domain=yandex.ru; Path=/', 'yandexuid=8747786251615498142; Expires=Tue, 11 Mar 2031 21:29:02 GMT; Domain=yandex.ru; Path=/',
url: function ({ date, channel }) { url: function ({ date, channel }) {
return `https://tv.yandex.ru/channel/${channel.site_id}?date=${date.format('YYYY-MM-DD')}` const [region, id] = channel.site_id.split('#')
return `https://tv.yandex.ru/${region}/channel/${id}?date=${date.format('YYYY-MM-DD')}`
}, },
parser: function ({ content }) { parser: function ({ content }) {
const initialState = content.match(/window.__INITIAL_STATE__ = (.*);/i) const initialState = content.match(/window.__INITIAL_STATE__ = (.*);/i)