Update tvguide.com

This commit is contained in:
freearhey
2023-12-01 01:30:11 +03:00
parent c2f9ff6df5
commit a9d065e3d3
4 changed files with 133 additions and 90 deletions

View File

@@ -36,6 +36,29 @@ module.exports = {
}
return programs
},
async channels() {
const providers = [9100001138]
let channels = []
for (let providerId of providers) {
const data = await axios
.get(
`https://fandom-prod.apigee.net/v1/xapi/tvschedules/tvguide/serviceprovider/${providerId}/sources/web`
)
.then(r => r.data)
.catch(console.log)
data.data.items.forEach(item => {
channels.push({
lang: 'en',
site_id: `${providerId}#${item.sourceId}`,
name: item.fullName
})
})
}
return channels
}
}