mirror of
https://github.com/iptv-org/epg
synced 2026-04-30 14:36:58 -04:00
Update /sites
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// npx epg-grabber --config=sites/mysky.com.ph/mysky.com.ph.config.js --channels=sites/mysky.com.ph/mysky.com.ph.channels.xml --output=guide.xml --days=2
|
||||
// npm run grab -- --site=mysky.com.ph
|
||||
// npm run channels:parse -- --config=./sites/mysky.com.ph/mysky.com.ph.config.js --output=./sites/mysky.com.ph/mysky.com.ph.channels.xml
|
||||
|
||||
const { parser, url } = require('./mysky.com.ph.config.js')
|
||||
@@ -19,7 +19,8 @@ it('can generate valid url', () => {
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = `{"events":[{"name":"TV PATROL","location":"8","start":"2022/10/04 19:00","end":"2022/10/04 20:00","userData":{"description":"Description example"}},{"name":"DARNA","location":"8","start":"2022/10/05 20:00","end":"2022/10/05 20:45","userData":{"description":""}},{"name":"Zoe Bakes S1","location":"22","start":"2022/10/04 20:30","end":"2022/10/04 21:00","userData":{"description":"Zo Franois Dad is a beekeeper. So for his birthday, she bakes him a special beehiveshaped cake."}}]}`
|
||||
const content =
|
||||
'{"events":[{"name":"TV PATROL","location":"8","start":"2022/10/04 19:00","end":"2022/10/04 20:00","userData":{"description":"Description example"}},{"name":"DARNA","location":"8","start":"2022/10/05 20:00","end":"2022/10/05 20:45","userData":{"description":""}},{"name":"Zoe Bakes S1","location":"22","start":"2022/10/04 20:30","end":"2022/10/04 21:00","userData":{"description":"Zo Franois Dad is a beekeeper. So for his birthday, she bakes him a special beehiveshaped cake."}}]}'
|
||||
const result = parser({ content, channel, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
@@ -38,7 +39,7 @@ it('can parse response', () => {
|
||||
|
||||
it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
content: ``,
|
||||
content: '',
|
||||
channel,
|
||||
date
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user