Update mi.tv

This commit is contained in:
Aleksandr Statciuk 2022-02-01 05:16:13 +03:00
parent 8c09c073e7
commit 25d0cd4b88
2 changed files with 1 additions and 13 deletions

View file

@ -13,12 +13,6 @@ module.exports = {
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 }) {
const programs = []
const items = parseItems(content)

View file

@ -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
const { parser, url, logo } = require('./mi.tv.config.js')
const { parser, url } = require('./mi.tv.config.js')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
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', () => {
const result = parser({ content, date }).map(p => {
p.start = p.start.toJSON()