Update /sites
This commit is contained in:
1 parent
ca254a6df0
commit
c0cfcf7a47
543 files changed
+30781
-31187
No files matched your search
@@ -17,10 +17,9 @@ module.exports = {
|
||||
return `${API_ENDPOINT}?page=${page}&limit=1&day=${date.format('YYYY-MM-DD')}`
|
||||
},
|
||||
parser: function ({ content, channel }) {
|
||||
let offset = -1
|
||||
let programs = []
|
||||
const items = parseItems(content, channel)
|
||||
items.forEach((item, i) => {
|
||||
items.forEach(item => {
|
||||
const prev = programs[programs.length - 1]
|
||||
let start
|
||||
if (prev) {
|
||||
@@ -90,7 +89,7 @@ function parseStart(item, date) {
|
||||
}
|
||||
|
||||
function parseDuration(item) {
|
||||
const [_, H, mm, ss] = item.duration.match(/(\d+):(\d+):(\d+)$/)
|
||||
const [, H, mm, ss] = item.duration.match(/(\d+):(\d+):(\d+)$/)
|
||||
|
||||
return parseInt(H) * 3600 + parseInt(mm) * 60 + parseInt(ss)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user