Update /sites
This commit is contained in:
1 parent
ca254a6df0
commit
c0cfcf7a47
543 files changed
+30781
-31187
No files matched your search
@@ -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