mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 02:16:40 -05:00
Update grab.js
This commit is contained in:
@@ -16,6 +16,7 @@ const options = program.opts()
|
||||
|
||||
async function main() {
|
||||
console.log('Starting...')
|
||||
console.time('Done in')
|
||||
|
||||
const buffer = {}
|
||||
const channels = parseChannels(options.channels).filter(channel => {
|
||||
@@ -46,13 +47,16 @@ async function main() {
|
||||
.then(results => {
|
||||
programs = programs.concat(results)
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(` Error: ${err.message}`)
|
||||
})
|
||||
}
|
||||
|
||||
const xml = grabber.convertToXMLTV({ channels, programs })
|
||||
writeToFile(options.output, xml)
|
||||
|
||||
console.log(`File '${options.output}' successfully saved`)
|
||||
console.log('Finish')
|
||||
console.timeEnd(`Done in`)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user