mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update znbc.co.zm
This commit is contained in:
parent
edf4bc12e4
commit
aaf0f76b6b
2 changed files with 1 additions and 13 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue