read desc

meo.pt:
- organise channels
- add more xmltv_id's

nostv.pt:
- organise channels
- add more xmltv_id's

vodafone.pt:
- organise channels
- add more xmltv_id's
- add parse channel function in vodafone.pt.config.js

rtp.pt:
- add parse channel funcion in rtp.pt.config.js

sporttv.pt:
- add parse channel funcion in rtp.pt.config.js

opto.sic.pt:
- remove one channel that isn't in their guide now
This commit is contained in:
thomraider12
2026-03-15 12:59:34 +00:00
parent 283c87ba80
commit f23fd33347
9 changed files with 467 additions and 399 deletions
+25
View File
@@ -1,9 +1,34 @@
const dayjs = require('dayjs')
const cheerio = require('cheerio')
const fs = require('fs')
const path = require('path')
const { EPGGrabber } = require('epg-grabber')
module.exports = {
site: 'sporttv.pt',
channels: async () => {
const channelsPath = path.resolve(__dirname, 'sporttv.pt.channels.xml')
if (!fs.existsSync(channelsPath)) {
console.warn(`Channels file not found: ${channelsPath}. Returning empty list.`)
return []
}
const xml = fs.readFileSync(channelsPath, 'utf8')
const parsed = EPGGrabber.parseChannelsXML(xml)
return parsed.map(channel => ({
xmltv_id: channel.xmltv_id,
name: channel.name,
site_id: channel.site_id,
lang: channel.lang,
logo: channel.logo,
url: channel.url,
lcn: channel.lcn
}))
},
days: 2,
url: 'https://www.sporttv.pt/guia',
parser({ content, date, channel }) {
let programs = []