diff --git a/sites/ziggogo.tv/readme.md b/sites/ziggogo.tv/readme.md new file mode 100644 index 00000000..aad31462 --- /dev/null +++ b/sites/ziggogo.tv/readme.md @@ -0,0 +1,21 @@ +# ziggogo.tv + +https://www.ziggogo.tv/nl/epg/initial + +### Download the guide + +```sh +npm run grab -- --site=ziggogo.tv +``` + +### Update channel list + +```sh +npm run channels:parse -- --config=./sites/ziggogo.tv/ziggogo.tv.config.js --output=./sites/ziggogo.tv/ziggogo.tv.channels.xml +``` + +### Test + +```sh +npm test -- ziggogo.tv +``` diff --git a/sites/ziggogo.tv/ziggogo.tv.channels.xml b/sites/ziggogo.tv/ziggogo.tv.channels.xml index bf108ec8..8f93c8f8 100644 --- a/sites/ziggogo.tv/ziggogo.tv.channels.xml +++ b/sites/ziggogo.tv/ziggogo.tv.channels.xml @@ -1,145 +1,154 @@ - - - - ARTE France - NDR Fernsehen Hamburg - RTL - Sat. 1 Deutschland - ZDF - 2M Monde - Al Jazeera English - BBC Entertainment Europe - BBC One - BBC Two - BBC World News Europe - CGTN - CNBC Europe - CNN International Europe - EuroNews English - FashionTV Europe - MTV 80s - MTV 90s - MyZen TV - Penthouse Gold - Shorts TV - SET Asia - Utsav Gold - Utsav Plus - X-MO - Zee Cinema - Zee TV UK - Zing UK - TVE Internacional Europa - Mediaset Italia - 100% NL TV - 192 TV - 24 Kitchen - Animal Planet Europe - AT5 - ATV Avrupa - Baby TV Europe - BBC First Nederland - Boomerang Central & Eastern Europe - Canvas - Cartoon Network Nederland - Comedy Central Extra Netherlands - Comedy Central Nederland - Crime + Investigation UK - Discovery Channel Nederland - Discovery Science - Disney Channel Nederland - Dusk - Één - E! Europe - ESPN 2 Nederland - ESPN 3 Nederland - ESPN 4 Netherlands - ESPN Nederland - Eurosport 1 - Eurosport 2 - Evil Angel TV - Extreme Sports Channel - Family7 - Film 1 Action - Film 1 Drama - Film 1 Family - Film 1 Premiere - Fox NL - History Benelux - Horse & Country TV - Investigation Discovery Europe - Ketnet - L1 TV - Love Nature - Meiden van Holland Hard - Mezzo - MTV Hits Europe - MTV Live HD - MTV NL - National Geographic Nederland - National Geographic Wild Europe - Net 5 - NH Nieuws - Nickelodeon - Nick Jr - NickMusic - NickToons - NPO 1 - NPO 1 Extra - NPO 2 - NPO 2 Extra - NPO 3 - NPO Politiek - Omroep Brabant TV - Omroep Flevoland TV - Omroep Zeeland TV - Omrop Fryslân TV - ONS - Out TV - Passie XXX - Pebble TV - RTL 4 - RTL 5 - RTL 7 - RTL 8 - RTL Crime Nederland - RTL Lounge - RTL Telekids - RTL Z - TV Drenthe - RTV Utrecht - SBS 6 - SBS 9 - Slam! - Spike Nederland - Stingray Classica - Stingray Djazz - Stingray LiteTV - TLC Nederland - Tommy Teleshopping - TV 538 - TV5Monde Europe - TV Gelderland - TV Noord - TV Oost - TV Oranje - TV Rijnmond - TV West - Veronica - Xite - Ziggo Sport - Ziggo Sport Docu - Ziggo Sport Golf - Ziggo Sport Racing - Ziggo Sport Select - Ziggo Sport Tennis - Ziggo Sport Voetbal - Euro D - EuroStar - Habertürk - Show Turk - TRT Çocuk - TRT Müzik - TRT Türk - TV 8 International - + + + Arte + NDR + RTL + Sat. 1 + ZDF + Ziggo TV + ARD + WDR + RTV-7 + DanceTelevision + Secret Circle + Nickelodeon Ukraine + FilmBox + njam! + ducktv + Curiosity Channel + Playboy TV Europe + Dreamworks + NPO Soul & Jazz + ESPN + 2M + Aljazeera English + BBC Entertainment + BBC News + BBC One + BBC Two + CNBC Europe + CNN + Euronews + Fashion TV HD + MTV 80s + MTV 90s + MyZen TV + Penthouse Gold + Shorts TV + SET Asia + Utsav Gold + Utsav Plus + X-MO + Zee Cinema + Zee TV + Zing + TVE + Mediaset Italia + 24Kitchen + 100% NL TV + 192TV + Animal Planet + AT5 + ATV Avrupa + BabyTV + BBC First + Cartoonito + VRT CANVAS + Cartoon Network + Comedy Central + Crime+Investigation + Discovery + Discovery Science + Disney Channel + DUSK + VRT 1 + E! + ESPN 2 + ESPN 3 + ESPN 4 + ESPN + Eurosport 1 + Eurosport 2 + Evil Angel + Family7 + Film1 Action + Film1 Drama + Film1 Family + Film1 Premiere + STAR Channel + HISTORY + Horse & Country TV + ID + Ketnet + L1 TV + Love Nature + Meiden van Holland Hard + Mezzo + MTV + MTV Hits + MTV Live HD + National Geographic + National Geographic WILD + Net5 + NH + Nickelodeon + Nick Jr. + Nick Music + Nicktoons + NPO 1 + NPO 1 Extra + NPO 2 + NPO 2 Extra + NPO 3 + NPO Politiek en Nieuws + Omroep Brabant + Omroep Flevoland + Omroep Zeeland + Omrop Fryslân + ONS + OUTTV + Paramount Network + PassieXXX + RTL 4 + RTL 5 + RTL 7 + RTL 8 + RTL Crime + RTL Lounge + RTL Telekids + RTL Z + RTV Drenthe + RTV Utrecht + SBS6 + SBS9 + SLAM!TV + Stingray Classica + Stingray DJAZZ + Stingray LiteTV + TLC + TV5Monde + TV538 + Omroep Gelderland + RTV Noord + RTV Oost + TV Oranje + RTV Rijnmond + RTV West + Veronica / Disney XD + XITE + Ziggo Sport + Ziggo Sport Docu + Ziggo Sport Golf + Ziggo Sport Racing + Ziggo Sport Select + Ziggo Sport Tennis + Ziggo Sport Voetbal + Euro D + Eurostar + Habertürk + ShowTürk + TRT Çocuk + TRT Müzik + TRT Türk + TV8 Int. + diff --git a/sites/ziggogo.tv/ziggogo.tv.config.js b/sites/ziggogo.tv/ziggogo.tv.config.js index 42e171be..ca5cc84e 100644 --- a/sites/ziggogo.tv/ziggogo.tv.config.js +++ b/sites/ziggogo.tv/ziggogo.tv.config.js @@ -11,8 +11,8 @@ module.exports = { ttl: 60 * 60 * 1000 // 1 hour } }, - url: function ({ date, channel }) { - return `${API_ENDPOINT}/nl/${channel.lang}/events/segments/${date.format('YYYYMMDDHHmmss')}` + url: function ({ date }) { + return `${API_ENDPOINT}/nl/en/events/segments/${date.format('YYYYMMDDHHmmss')}` }, async parser({ content, channel, date }) { let programs = [] @@ -20,25 +20,19 @@ module.exports = { if (!items.length) return programs const promises = [ axios.get( - `${API_ENDPOINT}/nl/${channel.lang}/events/segments/${date - .add(6, 'h') - .format('YYYYMMDDHHmmss')}`, + `${API_ENDPOINT}/nl/en/events/segments/${date.add(6, 'h').format('YYYYMMDDHHmmss')}`, { responseType: 'arraybuffer' } ), axios.get( - `${API_ENDPOINT}/nl/${channel.lang}/events/segments/${date - .add(12, 'h') - .format('YYYYMMDDHHmmss')}`, + `${API_ENDPOINT}/nl/en/events/segments/${date.add(12, 'h').format('YYYYMMDDHHmmss')}`, { responseType: 'arraybuffer' } ), axios.get( - `${API_ENDPOINT}/nl/${channel.lang}/events/segments/${date - .add(18, 'h') - .format('YYYYMMDDHHmmss')}`, + `${API_ENDPOINT}/nl/en/events/segments/${date.add(18, 'h').format('YYYYMMDDHHmmss')}`, { responseType: 'arraybuffer' } @@ -81,9 +75,9 @@ module.exports = { .then(r => r.data) .catch(console.log) - return data.channels.map(item => { + return data.map(item => { return { - lang: 'be', + lang: 'nl', site_id: item.id, name: item.name } @@ -93,7 +87,7 @@ module.exports = { async function loadProgramDetails(item, channel) { if (!item.id) return {} - const url = `https://prod.spark.ziggogo.tv/eng/web/linear-service/v2/replayEvent/${item.id}?returnLinearContent=true&language=${channel.lang}` + const url = `https://prod.spark.ziggogo.tv/eng/web/linear-service/v2/replayEvent/${item.id}?returnLinearContent=true&language=en` const data = await axios .get(url) .then(r => r.data) diff --git a/sites/ziggogo.tv/ziggogo.tv.test.js b/sites/ziggogo.tv/ziggogo.tv.test.js index 0ec9c570..b8041316 100644 --- a/sites/ziggogo.tv/ziggogo.tv.test.js +++ b/sites/ziggogo.tv/ziggogo.tv.test.js @@ -1,6 +1,3 @@ -// npm run channels:parse -- --config=./sites/ziggogo.tv/ziggogo.tv.config.js --output=./sites/ziggogo.tv/ziggogo.tv.channels.xml -// npm run grab -- --site=ziggogo.tv - const { parser, url } = require('./ziggogo.tv.config.js') const fs = require('fs') const path = require('path')