Update sky.de

This commit is contained in:
freearhey
2023-11-27 16:18:20 +03:00
parent 1c5d49638c
commit c3d6368b04
4 changed files with 116 additions and 73 deletions

View File

@@ -35,6 +35,34 @@ module.exports = {
})
return programs
},
async channels() {
const axios = require('axios')
const data = await axios
.post(
'https://www.sky.de/sgtvg/service/getChannelList',
{ dom: 'de', s: 0, feed: 1 },
{
headers: {
'Content-Type': 'application/json',
Referer: 'https://www.sky.de/tvguide-7599',
'X-Requested-With': 'XMLHttpRequest'
}
}
)
.then(r => r.data)
.catch(console.log)
let channels = []
data.cl.forEach(item => {
channels.push({
lang: 'de',
name: item.cn,
site_id: item.ci
})
})
return channels
}
}