mirror of
https://github.com/iptv-org/epg
synced 2025-12-18 19:36:58 -05:00
Update mi.tv
This commit is contained in:
@@ -13,12 +13,6 @@ module.exports = {
|
|||||||
|
|
||||||
return `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 $ = cheerio.load(content)
|
|
||||||
const imgSrc = $('#listings > div.channel-info > img').attr('src')
|
|
||||||
|
|
||||||
return imgSrc || null
|
|
||||||
},
|
|
||||||
parser({ content, date }) {
|
parser({ content, date }) {
|
||||||
const programs = []
|
const programs = []
|
||||||
const items = parseItems(content)
|
const items = parseItems(content)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// npx epg-grabber --config=sites/mi.tv/mi.tv.config.js --channels=sites/mi.tv/mi.tv_ar.channels.xml --output=.gh-pages/guides/ar/mi.tv.epg.xml --days=2
|
// npx epg-grabber --config=sites/mi.tv/mi.tv.config.js --channels=sites/mi.tv/mi.tv_ar.channels.xml --output=.gh-pages/guides/ar/mi.tv.epg.xml --days=2
|
||||||
|
|
||||||
const { parser, url, logo } = require('./mi.tv.config.js')
|
const { parser, url } = require('./mi.tv.config.js')
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||||
@@ -20,12 +20,6 @@ it('can generate valid url', () => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can generate valid logo url', () => {
|
|
||||||
expect(logo({ content })).toBe(
|
|
||||||
'https://cdn.mitvstatic.com/channels/ar_24-7-canal-de-noticias_m.png'
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can parse response', () => {
|
it('can parse response', () => {
|
||||||
const result = parser({ content, date }).map(p => {
|
const result = parser({ content, date }).map(p => {
|
||||||
p.start = p.start.toJSON()
|
p.start = p.start.toJSON()
|
||||||
|
|||||||
Reference in New Issue
Block a user