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

@@ -17,7 +17,7 @@ module.exports = {
channel.site_id
}.html?dt=${date.format('YYYY-MM-DD')}`
},
parser: function ({ channel, content, date, lang }) {
parser: function ({ content, date }) {
const programs = []
const dom = new JSDOM(content)
const items = dom.window.document.querySelectorAll(

View File

@@ -20,7 +20,7 @@ module.exports = {
channel.site_id
}.html`
},
parser: function ({ channel, content, date, lang }) {
parser: function ({ content, date }) {
const programs = []
const dom = new JSDOM(content)
const broadcastCards = dom.window.document.querySelectorAll('.singleBroadcastCard')

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

View File

@@ -16,7 +16,7 @@ module.exports = {
url: function ({ date, channel }) {
return `https://www.tvguide.co.uk/mobile/channellisting.asp?ch=${channel.site_id}`
},
parser: function ({ channel, content, date, lang }) {
parser: function ({ content, date }) {
const programs = []
const dom = new JSDOM(content)
const channelListings = dom.window.document.querySelector('#channel-listings')