From 49e629ae3004055044d9c83a179048b825148cb2 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Tue, 1 Feb 2022 05:38:43 +0300 Subject: [PATCH] Update tv.blue.ch --- sites/tv.blue.ch/tv.blue.ch.config.js | 3 --- sites/tv.blue.ch/tv.blue.ch.test.js | 8 +------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/sites/tv.blue.ch/tv.blue.ch.config.js b/sites/tv.blue.ch/tv.blue.ch.config.js index 16d85630..acf291dc 100644 --- a/sites/tv.blue.ch/tv.blue.ch.config.js +++ b/sites/tv.blue.ch/tv.blue.ch.config.js @@ -14,9 +14,6 @@ module.exports = { .add(1, 'd') .format('YYYYMMDDHHss')};level=normal)` }, - logo({ channel }) { - return `https://services.sg101.prd.sctv.ch/content/images/tv/channel/${channel.site_id}_image_7_w116.webp` - }, parser: function ({ content }) { let programs = [] const items = parseItems(content) diff --git a/sites/tv.blue.ch/tv.blue.ch.test.js b/sites/tv.blue.ch/tv.blue.ch.test.js index c8db528f..639a55c6 100644 --- a/sites/tv.blue.ch/tv.blue.ch.test.js +++ b/sites/tv.blue.ch/tv.blue.ch.test.js @@ -1,7 +1,7 @@ // node ./scripts/commands/parse-channels.js --config=./sites/tv.blue.ch/tv.blue.ch.config.js --output=./sites/tv.blue.ch/tv.blue.ch_ch.channels.xml // npx epg-grabber --config=sites/tv.blue.ch/tv.blue.ch.config.js --channels=sites/tv.blue.ch/tv.blue.ch_ch.channels.xml --output=guide.xml --days=2 -const { parser, url, logo } = require('./tv.blue.ch.config.js') +const { parser, url } = require('./tv.blue.ch.config.js') const dayjs = require('dayjs') const utc = require('dayjs/plugin/utc') const customParseFormat = require('dayjs/plugin/customParseFormat') @@ -20,12 +20,6 @@ it('can generate valid url', () => { ) }) -it('can get logo url', () => { - expect(logo({ channel })).toBe( - 'https://services.sg101.prd.sctv.ch/content/images/tv/channel/1221_image_7_w116.webp' - ) -}) - it('can parse response', () => { const content = `{"Nodes":{"Count":1,"TotalItemCount":1,"Items":[{"Domain":"TV","Identifier":"1221","Kind":"Channel","Content":{"Description":{"Title":"blue Zoom D","Language":"de"},"Nodes":{"Count":29,"TotalItemCount":29,"Items":[{"Domain":"TV","Identifier":"t1221ddc59247d45","Kind":"Broadcast","Channel":"1221","Content":{"Description":{"Title":"Weekend on the Rocks","Summary":" - «R.E.S.P.E.C.T», lieber Charles Nguela. Der Comedian tourt fleissig durch die Schweiz, macht für uns aber einen Halt, um in der neuen Ausgabe von «Weekend on the Rocks» mit Moderatorin Vania Spescha über die Entertainment-News der Woche zu plaudern.","ShortSummary":"","Country":"CH","ReleaseDate":"2021-01-01T00:00:00Z","Source":"13","Language":"de","Duration":"00:30:00"},"Nodes":{"Count":1,"TotalItemCount":1,"Items":[{"Domain":"TV","Identifier":"t1221ddc59247d45_landscape","Kind":"Image","Role":"Landscape","ContentPath":"/tv/broadcast/1221/t1221ddc59247d45_landscape","Version":{"Date":"2022-01-04T08:55:22.567Z"}}]},"TechnicalAttributes":{"Stereo":true}},"Version":{"Hash":"60d3"},"Availabilities":[{"AvailabilityStart":"2022-01-16T23:30:00Z","AvailabilityEnd":"2022-01-17T00:00:00Z"}],"Relations":[{"Domain":"TV","Kind":"Reference","Role":"ChannelIdentifier","TargetIdentifier":"2b0898c7-3920-3200-7048-4ea5d9138921"},{"Domain":"TV","Kind":"Reference","Role":"OriginalAirSeries","TargetIdentifier":"false"},{"Domain":"TV","Kind":"Reference","Role":"ExternalBroadcastIdentifier","TargetIdentifier":"167324536-11"},{"Domain":"TV","Kind":"Reference","Role":"ProgramIdentifier","TargetIdentifier":"p12211351631155","Title":"Original"}]}]}}}]}}` const result = parser({ content }).map(p => {