Update telenettv.be.config.js

This commit is contained in:
Aleksandr Statciuk 2022-10-28 07:02:13 +03:00
parent e9c8f9c286
commit 3f50fb137a

View file

@ -5,6 +5,7 @@ const API_ENDPOINT = `https://obo-prod.oesp.telenettv.be/oesp/v4/BE/eng/web`
module.exports = {
site: 'telenettv.be',
ignore: true, // INFO: Request failed with status code 404 (Not Found)
url: function ({ date }) {
return `${API_ENDPOINT}/programschedules/${date.format('YYYYMMDD')}/1`
},
@ -68,7 +69,7 @@ async function loadProgramDetails(item) {
.then(r => r.data)
.catch(console.log)
return data || {}
}
}
function parseStart(item) {
return dayjs(item.s)
@ -86,7 +87,7 @@ function parseItems(content, channel) {
return entity ? entity.l : []
}
function parseDescription(detail){
function parseDescription(detail) {
return detail.program.longDescription || null
}
@ -94,15 +95,14 @@ function parseCategory(detail) {
let categories = []
detail.program.categories.forEach(category => {
categories.push(category.title)
});
})
return categories
}
}
function parseSeason(detail) {
function parseSeason(detail) {
return detail.program.seriesNumber || null
}
}
function parseEpisode(detail) {
function parseEpisode(detail) {
return detail.program.seriesEpisodeNumber || null
}
}