mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
Update mi.tv.config.js
This commit is contained in:
parent
fd9292b855
commit
d2d858f82a
1 changed files with 3 additions and 6 deletions
|
@ -2,23 +2,20 @@ const jsdom = require('jsdom')
|
|||
const { JSDOM } = jsdom
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const timezone = require('dayjs/plugin/timezone')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
module.exports = {
|
||||
lang: 'pt',
|
||||
days: 3,
|
||||
site: 'mi.tv',
|
||||
channels: 'mi.tv.channels.xml',
|
||||
output: '.gh-pages/guides/mi.tv.guide.xml',
|
||||
url({ date, channel }) {
|
||||
const [country, id] = channel.site_id.split('#')
|
||||
|
||||
return `https://mi.tv/${country}/async/channel/${id}/${date.format('YYYY-MM-DD')}/-180`
|
||||
console.log(`https://mi.tv/${country}/async/channel/${id}/${date.format('YYYY-MM-DD')}/0`)
|
||||
return `https://mi.tv/${country}/async/channel/${id}/${date.format('YYYY-MM-DD')}/0`
|
||||
},
|
||||
logo({ content }) {
|
||||
const dom = new JSDOM(content)
|
||||
|
@ -56,7 +53,7 @@ function parseStart(item, date) {
|
|||
if (!time) return null
|
||||
time = `${date.format('MM/DD/YYYY')} ${time}`
|
||||
|
||||
return dayjs.tz(time, 'MM/DD/YYYY HH:mm', 'America/Sao_Paulo')
|
||||
return dayjs.utc(time, 'MM/DD/YYYY HH:mm')
|
||||
}
|
||||
|
||||
function parseTitle(item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue