mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update grab.js
This commit is contained in:
parent
eef60a1b9d
commit
9e61fec007
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue