mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 18:37:01 -05:00
Update hd-plus.de
This commit is contained in:
@@ -9,7 +9,6 @@ dayjs.extend(timezone)
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
module.exports = {
|
||||
lang: 'de',
|
||||
site: 'hd-plus.de',
|
||||
url({ date, channel }) {
|
||||
const today = dayjs().utc().startOf('d')
|
||||
@@ -17,12 +16,6 @@ module.exports = {
|
||||
|
||||
return `https://www.hd-plus.de/epg/channel/${channel.site_id}?d=${day}`
|
||||
},
|
||||
logo({ content }) {
|
||||
const $ = cheerio.load(content)
|
||||
const imgSrc = $('header > img').attr('src')
|
||||
|
||||
return imgSrc ? `https:${imgSrc}` : null
|
||||
},
|
||||
parser({ content, date }) {
|
||||
const programs = []
|
||||
const items = parseItems(content)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// npx epg-grabber --config=sites/hd-plus.de/hd-plus.de.config.js --channels=sites/hd-plus.de/hd-plus.de_de.channels.xml --output=.gh-pages/guides/de/hd-plus.de.epg.xml --days=2
|
||||
|
||||
const { parser, url, logo } = require('./hd-plus.de.config.js')
|
||||
const { parser, url } = require('./hd-plus.de.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
@@ -19,10 +19,6 @@ it('can generate valid url', () => {
|
||||
expect(url({ channel, date: today })).toBe('https://www.hd-plus.de/epg/channel/1-2-3-tv-hd?d=0')
|
||||
})
|
||||
|
||||
it('can generate valid logo url', () => {
|
||||
expect(logo({ content })).toBe('https://cdn.hd-plus.de/senderlogos/bright-cropped/24444-2.png')
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const result = parser({ content, channel, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
|
||||
Reference in New Issue
Block a user