Update znbc.co.zm
This commit is contained in:
@@ -14,14 +14,6 @@ module.exports = {
|
||||
url({ channel }) {
|
||||
return `https://www.znbc.co.zm/${channel.site_id}/`
|
||||
},
|
||||
logo({ content }) {
|
||||
const $ = cheerio.load(content)
|
||||
const imgSrc = $(
|
||||
'.elementor-tab-content > table > tbody > tr:nth-child(1) > td span > img'
|
||||
).data('src')
|
||||
|
||||
return imgSrc || null
|
||||
},
|
||||
parser({ content, date }) {
|
||||
const programs = []
|
||||
const items = parseItems(content, date)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// npx epg-grabber --config=sites/znbc.co.zm/znbc.co.zm.config.js --channels=sites/znbc.co.zm/znbc.co.zm_zm.channels.xml --output=.gh-pages/guides/zm/znbc.co.zm.epg.xml --days=2
|
||||
|
||||
const { parser, url, logo } = require('./znbc.co.zm.config.js')
|
||||
const { parser, url } = require('./znbc.co.zm.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
@@ -18,10 +18,6 @@ it('can generate valid url', () => {
|
||||
expect(url({ channel })).toBe('https://www.znbc.co.zm/tv1/')
|
||||
})
|
||||
|
||||
it('can generate valid logo url', () => {
|
||||
expect(logo({ content })).toBe('https://www.znbc.co.zm/wp-content/uploads/2019/04/TV2-Logo.jpg')
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const result = parser({ content, channel, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
|
||||
Reference in New Issue
Block a user