Update vidio.com.config.js

This commit is contained in:
Aleksandr Statciuk 2021-10-05 03:33:50 +03:00
parent c29354b765
commit a5c6092c12

View file

@ -11,10 +11,7 @@ dayjs.extend(customParseFormat)
dayjs.extend(timezone) dayjs.extend(timezone)
module.exports = { module.exports = {
lang: 'id',
site: 'vidio.com', site: 'vidio.com',
channels: 'vidio.com.channels.xml',
output: '.gh-pages/guides/vidio.com.guide.xml',
url({ channel }) { url({ channel }) {
return `https://www.vidio.com/live/${channel.site_id}/schedules` return `https://www.vidio.com/live/${channel.site_id}/schedules`
}, },
@ -22,9 +19,9 @@ module.exports = {
const programs = [] const programs = []
const dom = new JSDOM(content) const dom = new JSDOM(content)
const scheduleDate = dom.window.document.querySelector( const scheduleDate = dom.window.document
'div.b-livestreaming-daily-schedule__date-label' .querySelector('div.b-livestreaming-daily-schedule__date-label')
).textContent.split(',') .textContent.split(',')
const currdate = dayjs(scheduleDate[1], 'DD MMMM YYYY', 'id') const currdate = dayjs(scheduleDate[1], 'DD MMMM YYYY', 'id')
const list = dom.window.document.querySelector( const list = dom.window.document.querySelector(
`#schedule-content-${currdate.format( `#schedule-content-${currdate.format(