Update m.tv.sms.cz

This commit is contained in:
Aleksandr Statciuk 2022-02-01 05:09:37 +03:00
parent fddd348a8a
commit 4f31c2dc38
2 changed files with 1 additions and 11 deletions

View file

@ -16,12 +16,6 @@ module.exports = {
'YYYY-MM-DD'
)}`
},
logo: function ({ content }) {
const $ = cheerio.load(content)
const imgSrc = $('.logo_out > img').attr('src')
return imgSrc ? `https:${imgSrc}` : null
},
parser: function ({ buffer, date }) {
const programs = []
const items = parseItems(buffer)

View file

@ -1,6 +1,6 @@
// npx epg-grabber --config=sites/m.tv.sms.cz/m.tv.sms.cz.config.js --channels=sites/m.tv.sms.cz/m.tv.sms.cz_cz.channels.xml --output=.gh-pages/guides/cz/m.tv.sms.cz.epg.xml --days=2
const { parser, url, logo } = require('./m.tv.sms.cz.config.js')
const { parser, url } = require('./m.tv.sms.cz.config.js')
const iconv = require('iconv-lite')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
@ -22,10 +22,6 @@ it('can generate valid url', () => {
)
})
it('can generate valid logo url', () => {
expect(logo({ content })).toBe('https://www.sms.cz/kategorie/televize/bmp/loga/velka/cero.png')
})
it('can parse response', () => {
const result = parser({ buffer, date }).map(p => {
p.start = p.start.toJSON()