From edf4bc12e46d7b0abcfed47a0063fe10268d14f4 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Tue, 1 Feb 2022 05:59:41 +0300 Subject: [PATCH] Update zap.co.ao --- sites/zap.co.ao/zap.co.ao.config.js | 6 ------ sites/zap.co.ao/zap.co.ao.test.js | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/sites/zap.co.ao/zap.co.ao.config.js b/sites/zap.co.ao/zap.co.ao.config.js index 0063a8e0..e825e76c 100644 --- a/sites/zap.co.ao/zap.co.ao.config.js +++ b/sites/zap.co.ao/zap.co.ao.config.js @@ -12,12 +12,6 @@ module.exports = { url: function ({ date, channel }) { return `https://www.zap.co.ao/_api/channels/${date.format('YYYY-M-D')}/epg.json` }, - logo({ content, channel }) { - const channels = JSON.parse(content) - const data = channels.find(ch => ch.id == channel.site_id) - - return data ? data.image_uri : null - }, parser: function ({ content, channel, date }) { const programs = [] const items = parseItems(content, channel) diff --git a/sites/zap.co.ao/zap.co.ao.test.js b/sites/zap.co.ao/zap.co.ao.test.js index f2fb400a..02b194c9 100644 --- a/sites/zap.co.ao/zap.co.ao.test.js +++ b/sites/zap.co.ao/zap.co.ao.test.js @@ -1,6 +1,6 @@ // npx epg-grabber --config=sites/zap.co.ao/zap.co.ao.config.js --channels=sites/zap.co.ao/zap.co.ao_ao.channels.xml --output=.gh-pages/guides/ao/zap.co.ao.epg.xml --days=2 -const { parser, url, logo } = require('./zap.co.ao.config.js') +const { parser, url } = require('./zap.co.ao.config.js') const dayjs = require('dayjs') const utc = require('dayjs/plugin/utc') const customParseFormat = require('dayjs/plugin/customParseFormat') @@ -18,12 +18,6 @@ it('can generate valid url', () => { expect(url({ date })).toBe('https://www.zap.co.ao/_api/channels/2021-11-25/epg.json') }) -it('can generate valid logo url', () => { - expect(logo({ content, channel })).toBe( - 'https://www.zap.co.ao/media/cache/movie_thumb/uploads/ao/channels/54bd3c6b068ef.png' - ) -}) - it('can parse response', () => { const result = parser({ content, channel, date }).map(p => { p.start = p.start.toJSON()