Merge pull request #1750 from RevGear/sky.de

Update sky.de guide
This commit is contained in:
Aleksandr Statciuk 2023-01-20 23:22:46 +03:00 committed by GitHub
commit 1dc934dc63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -3,10 +3,14 @@ const dayjs = require('dayjs')
module.exports = { module.exports = {
site: 'sky.de', site: 'sky.de',
days: 2, days: 2,
skip: true, // server returns error 403 (https://github.com/iptv-org/epg/runs/5435899744?check_suite_focus=true)
url: `https://www.sky.de/sgtvg/service/getBroadcastsForGrid`, url: `https://www.sky.de/sgtvg/service/getBroadcastsForGrid`,
request: { request: {
method: 'POST', method: 'POST',
headers: {
'accept-language': 'en-GB',
'accept-encoding': 'gzip, deflate, br',
accept: 'application/json'
},
data: function ({ channel, date }) { data: function ({ channel, date }) {
return { return {
cil: [channel.site_id], cil: [channel.site_id],
@ -43,4 +47,4 @@ function parseContent(content, channel) {
function parseItems(content, channel) { function parseItems(content, channel) {
const data = parseContent(content, channel) const data = parseContent(content, channel)
return data && Array.isArray(data.el) ? data.el : [] return data && Array.isArray(data.el) ? data.el : []
} }

View file

@ -64,4 +64,4 @@ it('can handle empty guide', () => {
content: `[]` content: `[]`
}) })
expect(result).toMatchObject([]) expect(result).toMatchObject([])
}) })