wip
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user