From de1a0711f480c432e2d11474498601b69d5ad912 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Tue, 1 Feb 2022 05:04:51 +0300 Subject: [PATCH] Update hd-plus.de --- sites/hd-plus.de/hd-plus.de.config.js | 7 ------- sites/hd-plus.de/hd-plus.de.test.js | 6 +----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/sites/hd-plus.de/hd-plus.de.config.js b/sites/hd-plus.de/hd-plus.de.config.js index db400d1d..ad2b1fe7 100644 --- a/sites/hd-plus.de/hd-plus.de.config.js +++ b/sites/hd-plus.de/hd-plus.de.config.js @@ -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) diff --git a/sites/hd-plus.de/hd-plus.de.test.js b/sites/hd-plus.de/hd-plus.de.test.js index c5a048eb..21ae0055 100644 --- a/sites/hd-plus.de/hd-plus.de.test.js +++ b/sites/hd-plus.de/hd-plus.de.test.js @@ -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()