This commit is contained in:
freearhey
2021-03-13 17:43:54 +03:00
parent ea1d9b7370
commit a6712a602f
6 changed files with 355 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ module.exports = {
url: function ({ date, channel }) {
return `https://tv.yandex.ru/channel/${channel.site_id}?date=${date.format('YYYY-MM-DD')}`
},
parser: function ({ channel, content, lang }) {
parser: function ({ content }) {
const initialState = content.match(/window.__INITIAL_STATE__ = (.*);/i)
let programs = []
if (!initialState && !initialState[1]) return programs