Update /sites

This commit is contained in:
freearhey
2023-10-02 06:35:33 +03:00
parent ca254a6df0
commit c0cfcf7a47
543 changed files with 30781 additions and 31187 deletions

View File

@@ -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 []
}
}
}