Update dishtv.in

This commit is contained in:
Aleksandr Statciuk 2022-02-01 04:52:26 +03:00
parent 6d47472b13
commit 2ba75f690d
2 changed files with 1 additions and 14 deletions

View file

@ -21,12 +21,6 @@ module.exports = {
} }
} }
}, },
logo({ content }) {
const data = parseContent(content)
const $ = cheerio.load(data)
return $(`img.chnl-logo`).attr('src')
},
parser: function ({ content, channel, date }) { parser: function ({ content, channel, date }) {
let programs = [] let programs = []
const data = parseContent(content) const data = parseContent(content)

View file

@ -1,6 +1,6 @@
// npx epg-grabber --config=sites/dishtv.in/dishtv.in.config.js --channels=sites/dishtv.in/dishtv.in_in.channels.xml --output=.gh-pages/guides/in/dishtv.in.epg.xml --days=2 // npx epg-grabber --config=sites/dishtv.in/dishtv.in.config.js --channels=sites/dishtv.in/dishtv.in_in.channels.xml --output=.gh-pages/guides/in/dishtv.in.epg.xml --days=2
const { parser, url, logo, request } = require('./dishtv.in.config.js') const { parser, url, request } = require('./dishtv.in.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')
@ -26,13 +26,6 @@ it('can generate valid request data', () => {
}) })
}) })
it('can get logo url', () => {
const result = logo({ content })
expect(result).toBe(
'http://imagesdishtvd2h.whatsonindia.com/dasimages/channel/landscape/360x270/hiyj8ndf.png'
)
})
it('can parse response', () => { it('can parse response', () => {
const result = parser({ date, channel, content }) const result = parser({ date, channel, content })
expect(result).toMatchObject([ expect(result).toMatchObject([