mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update /sites
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="vtm.be">
|
||||
<channels>
|
||||
<channel lang="nl" xmltv_id="VTM.be" site_id="vtm">VTM</channel>
|
||||
<channel lang="nl" xmltv_id="VTM2.be" site_id="vtm2">VTM 2</channel>
|
||||
<channel lang="nl" xmltv_id="VTM3.be" site_id="vtm3">VTM 3</channel>
|
||||
<channel lang="nl" xmltv_id="VTM4.be" site_id="vtm4">VTM 4</channel>
|
||||
<channel lang="nl" xmltv_id="QmusicVlaanderen.be" site_id="qmusic">Q-music Vlaanderen</channel>
|
||||
<channel lang="nl" xmltv_id="VTMGold.be" site_id="vtmgold">VTM Gold</channel>
|
||||
<channel lang="nl" xmltv_id="VTMKids.be" site_id="vtm-kids">VTM Kids</channel>
|
||||
</channels>
|
||||
</site>
|
||||
<channels>
|
||||
<channel site="vtm.be" lang="nl" xmltv_id="QmusicVlaanderen.be" site_id="qmusic">Q-music Vlaanderen</channel>
|
||||
<channel site="vtm.be" lang="nl" xmltv_id="VTM.be" site_id="vtm">VTM</channel>
|
||||
<channel site="vtm.be" lang="nl" xmltv_id="VTM2.be" site_id="vtm2">VTM 2</channel>
|
||||
<channel site="vtm.be" lang="nl" xmltv_id="VTM3.be" site_id="vtm3">VTM 3</channel>
|
||||
<channel site="vtm.be" lang="nl" xmltv_id="VTM4.be" site_id="vtm4">VTM 4</channel>
|
||||
<channel site="vtm.be" lang="nl" xmltv_id="VTMGold.be" site_id="vtmgold">VTM Gold</channel>
|
||||
<channel site="vtm.be" lang="nl" xmltv_id="VTMKids.be" site_id="vtm-kids">VTM Kids</channel>
|
||||
</channels>
|
||||
@@ -35,7 +35,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
function parseContent(content) {
|
||||
const [_, json] = content.match(/window.__EPG_REDUX_DATA__=(.*);\n/i) || [null, null]
|
||||
const [, json] = content.match(/window.__EPG_REDUX_DATA__=(.*);\n/i) || [null, null]
|
||||
const data = JSON.parse(json)
|
||||
|
||||
return data
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// npx epg-grabber --config=sites/vtm.be/vtm.be.config.js --channels=sites/vtm.be/vtm.be.channels.xml --output=guide.xml --days=2
|
||||
// npm run grab -- --site=vtm.be
|
||||
|
||||
const { parser, url } = require('./vtm.be.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
@@ -28,7 +28,8 @@ it('can parse response', () => {
|
||||
stop: '2021-11-11T00:20:00.000Z',
|
||||
title: 'Wooninspiraties',
|
||||
icon: 'https://images4.persgroep.net/rcs/z5qrZHumkjuN5rWzoaRJ_BTdL7A/diocontent/209688322/_fill/600/400?appId=da11c75db9b73ea0f41f0cd0da631c71',
|
||||
description: `Een team gaat op pad om inspiratie op te doen over alles wat met wonen en leven te maken heeft; Ze trekken heel het land door om de laatste trends en tips op het gebied van wonen te achterhalen.`,
|
||||
description:
|
||||
'Een team gaat op pad om inspiratie op te doen over alles wat met wonen en leven te maken heeft; Ze trekken heel het land door om de laatste trends en tips op het gebied van wonen te achterhalen.',
|
||||
category: 'Magazine'
|
||||
}
|
||||
])
|
||||
@@ -38,7 +39,7 @@ it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
date,
|
||||
channel,
|
||||
content: `<html lang="nl"> <head></head> <body></body></html>`
|
||||
content: '<html lang="nl"> <head></head> <body></body></html>'
|
||||
})
|
||||
expect(result).toMatchObject([])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user