mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update programtv.onet.pl
This commit is contained in:
parent
fa77ccfdf1
commit
2b3008a0e0
2 changed files with 1 additions and 13 deletions
|
@ -17,12 +17,6 @@ module.exports = {
|
|||
|
||||
return `https://programtv.onet.pl/program-tv/${channel.site_id}?dzien=${day}`
|
||||
},
|
||||
logo: function ({ content }) {
|
||||
const $ = cheerio.load(content)
|
||||
const imgSrc = $('#channelTV > section > header > span > img').attr('src')
|
||||
|
||||
return imgSrc ? `https:${imgSrc}` : null
|
||||
},
|
||||
parser: function ({ content, date }) {
|
||||
const programs = []
|
||||
const items = parseItems(content)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// npx epg-grabber --config=sites/programtv.onet.pl/programtv.onet.pl.config.js --channels=sites/programtv.onet.pl/programtv.onet.pl_pl.channels.xml --output=guide.xml --days=2
|
||||
|
||||
const MockDate = require('mockdate')
|
||||
const { parser, url, logo } = require('./programtv.onet.pl.config.js')
|
||||
const { parser, url } = require('./programtv.onet.pl.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
|
@ -31,12 +31,6 @@ it('can generate valid url for next day', () => {
|
|||
MockDate.reset()
|
||||
})
|
||||
|
||||
it('can generate valid logo url', () => {
|
||||
expect(logo({ content })).toBe(
|
||||
'https://ocdn.eu/ptv2-images-transforms/1/zB4kr1sb2dvLW1pZ3JhdGVkLzEzdGgtc3RyZWV0LnBuZ5KVAmQAwsOVAgAowsM'
|
||||
)
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const result = parser({ content, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue