mirror of
https://github.com/iptv-org/epg
synced 2026-04-29 14:06:59 -04:00
Update /sites
This commit is contained in:
@@ -14,13 +14,15 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
url({ date }) {
|
||||
return `https://www.singtel.com/etc/singtel/public/tv/epg-parsed-data/${date.format('DDMMYYYY')}.json`
|
||||
return `https://www.singtel.com/etc/singtel/public/tv/epg-parsed-data/${date.format(
|
||||
'DDMMYYYY'
|
||||
)}.json`
|
||||
},
|
||||
parser({ content, channel }) {
|
||||
let programs = []
|
||||
const items = parseItems(content, channel)
|
||||
items.forEach(item => {
|
||||
const start = dayjs.tz(item.startDateTime,'Asia/Singapore')
|
||||
const start = dayjs.tz(item.startDateTime, 'Asia/Singapore')
|
||||
const stop = start.add(item.duration, 's')
|
||||
programs.push({
|
||||
title: item.program.title,
|
||||
@@ -42,4 +44,4 @@ function parseItems(content, channel) {
|
||||
} catch (err) {
|
||||
return []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user