From 064a4ec350cf43f0d08d176dca850fb5f63b9bc7 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Tue, 1 Feb 2022 05:06:02 +0300 Subject: [PATCH] Update ipko.com --- sites/ipko.com/ipko.com.config.js | 3 -- sites/ipko.com/ipko.com.test.js | 9 +--- sites/ipko.com/ipko.com_al.channels.xml | 72 ++++++++++++------------- 3 files changed, 38 insertions(+), 46 deletions(-) diff --git a/sites/ipko.com/ipko.com.config.js b/sites/ipko.com/ipko.com.config.js index 340e5b24..efe2665f 100644 --- a/sites/ipko.com/ipko.com.config.js +++ b/sites/ipko.com/ipko.com.config.js @@ -8,9 +8,6 @@ module.exports = { url: function ({ date }) { return `https://www.ipko.com/epg/admin/programs.php?date=${date.format('YYYY-MM-DD')}` }, - logo({ channel }) { - return channel.logo - }, parser: function ({ content, channel, date }) { let programs = [] const items = parseItems(content, channel) diff --git a/sites/ipko.com/ipko.com.test.js b/sites/ipko.com/ipko.com.test.js index 168bf79a..1331f97c 100644 --- a/sites/ipko.com/ipko.com.test.js +++ b/sites/ipko.com/ipko.com.test.js @@ -1,6 +1,6 @@ // npx epg-grabber --config=sites/ipko.com/ipko.com.config.js --channels=sites/ipko.com/ipko.com_al.channels.xml --days=2 --output=.gh-pages/guides/al/ipko.com.epg.xml -const { parser, url, logo } = require('./ipko.com.config.js') +const { parser, url } = require('./ipko.com.config.js') const dayjs = require('dayjs') const utc = require('dayjs/plugin/utc') const customParseFormat = require('dayjs/plugin/customParseFormat') @@ -10,8 +10,7 @@ dayjs.extend(utc) const date = dayjs.utc('2021-10-24', 'YYYY-MM-DD').startOf('d') const channel = { site_id: '406', - xmltv_id: 'RTK1.rs', - logo: 'https://www.ipko.com/epg/logo/stinet.png' + xmltv_id: 'RTK1.rs' } const content = `{"element":{"1":[{"id":6367,"channel_id":406,"program_name":"Beautiful People 13","name_short":"","description":"Lin largohet nga Nju Meksiko për t'u vendosur në Nju Jork e për t'ia nisur nga fillimi: një punë të re, shtëpi të re dhe njohje të reja. Bashkë me të janë vajzat e saj, Sofia, një 16 vjeçare që shkëlqen në shkollë, dhe Kareni, 20 vjeçare, që do të bë","category":"Sezoni I","duration":150,"day":"Sun","left_distanc":165,"date":"00:55:00"}]}}` @@ -20,10 +19,6 @@ it('can generate valid url', () => { expect(result).toBe('https://www.ipko.com/epg/admin/programs.php?date=2021-10-24') }) -it('can get logo url', () => { - expect(logo({ channel })).toBe('https://www.ipko.com/epg/logo/stinet.png') -}) - it('can parse response', () => { const result = parser({ date, channel, content }) expect(result).toMatchObject([ diff --git a/sites/ipko.com/ipko.com_al.channels.xml b/sites/ipko.com/ipko.com_al.channels.xml index db53a2bc..ca98b7df 100644 --- a/sites/ipko.com/ipko.com_al.channels.xml +++ b/sites/ipko.com/ipko.com_al.channels.xml @@ -1,41 +1,41 @@ - 24 Kitchen Srbija - ABC News - Animal Planet Europe - Arta - Baby TV Europe - Bang Bang - BBC World News Europe - Boomerang Central & Eastern Europe - CNN International Europe - Çufo - Discovery Channel Bulgaria - Discovery Science - DTX East Europe - Eurosport 1 - Explorer Histori - Explorer Natyra - Explorer Shkencë - Film Aksion - Film Dramë - Film Hits - Film Komedi - Film Thriller - Hayat - Junior TV - Kohavision - MTV Live - My Music - National Geographic UK - News 24 - Peace TV English - Rai 1 - Rai 2 - Rai 3 - RTK 1 - RTV 21 Sat - Stinët + 24 Kitchen Srbija + ABC News + Animal Planet Europe + Arta + Baby TV Europe + Bang Bang + BBC World News Europe + Boomerang Central & Eastern Europe + CNN International Europe + Çufo + Discovery Channel Bulgaria + Discovery Science + DTX East Europe + Eurosport 1 + Explorer Histori + Explorer Natyra + Explorer Shkencë + Film Aksion + Film Dramë + Film Hits + Film Komedi + Film Thriller + Hayat + Junior TV + Kohavision + MTV Live + My Music + National Geographic UK + News 24 + Peace TV English + Rai 1 + Rai 2 + Rai 3 + RTK 1 + RTV 21 Sat + Stinët \ No newline at end of file