diff --git a/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.channels.xml b/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.channels.xml deleted file mode 100644 index 8948f4d29..000000000 --- a/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.channels.xml +++ /dev/null @@ -1,273 +0,0 @@ - - - Das Erste - DW njemački - SAT 1 - Sport 1 - ZDF - Baby TV - Balkanika - Blue Hustler - Brazzers TV - Cartoon Network - CBS Reality - CGTN - Club MTV - CNBC Europe - CNN Europe - Euronews - Extreme Sports - Fashion TV - France 24 engleski - Toxic TV - Hustler TV - MTV 00s - Nautical Channel - Sky News - Stingray Classica - Stingray Djazz - Vivid Red - Vivid Touch - Vivid TV - France 24 francuski - TV5 Monde - MAXtv Promo - Poljoprivredna TV - TV Sabor - OTV - Mreža TV Zagreb - Kanal Ri - GameHub - PLAVA Vinkovačka - VTV - TV Nova - Televizija Dalmacija - Trend TV - SBTV - DUTV - Osječka TV - TV Jadran - TV Šibenik - Radio HR1 - Radio HR2 - Radio HR3 - bravo! - Radio Otvoreni - Happy FM - Radio Antena - Radio Marija - Radio Osijek - Radio Pula - Radio Rijeka - Radio Sljeme - Radio Split - Radio Zadar - Radio Enter Zagreb - Radio Trogir - HIT TV - Arenasport 1 HD - Arenasport 2 HD - Arenasport 3 HD - Arenasport 4 HD - Arenasport 5 HD - Arena Fight - DMC - Toon Kids - Radio Slavonija - Radio Katolicki - Nickelodeon HD - Arenasport 6 HD - HBO 2 - HBO 3 - Arenasport 4 PPV - Arenasport 3 PPV - Arenasport 5 PPV - Nick Jr. hrvatski - History - HBO - Nickelodeon hrvatski - Slavonska TV - Arenasport 6 PPV - Libertas TV - TV Zapad - NONSTOP - History 2 - CineStar TV Premiere 1 HD - CineStar TV Premiere 2 HD - ExtraTV - Radio ExtraFM - Diadora TV - Arenasport 2 PPV - HRT 2 HD - HRT 3 HD - HRT 4 HD - Luxe TV - myZen.tv - Radio yammatFM - CineStar TV Fantasy HD - RTL Living HD - RTL 2 HD - RTL Kockica HD - RTL Adria HD - RTL Crime HD - RTL Passion HD - RTL HD - HRT 1 HD - Arena Esport - TestLive2 - Radio Capodistria - mojRADIO - Radio Dalmacija - Arenasport 7 HD - Arenasport 8 HD - Arenasport 9 HD - Arenasport 10 HD - Arenasport 7 PPV - Arenasport 8 PPV - Arenasport 9 PPV - Arenasport 10 PPV - TestLive1 - Radio Deejay HR - CGTN Documentary - B1 - Doku TV - Balkan TV - DW engleski - Radio Top - RTV HB - CineStar TV 2 HD - CineStar TV Comedy & Family HD - CineStar TV 1 HD - CineStar TV Action & Thriller HD - CineStar TV Comedy & Family - CineStar TV 2 - MAXSport 1 - MAXSport 2 - Klape i tambure - IDJ TV - Toxic Folk - Disney Channel - Disney Junior - Radio Rovinj FM - Radio Maria Vision - ICTbusiness TV - Radio Test 1 - Radio Test 2 - Radio Test 3 - Radio Test 4 - Radio Test 5 - Bloomberg Adria - 3SAT - 24Kitchen - Al Jazeera - Arenasport 1 - Arenasport 2 - Arenasport 3 - Arenasport 4 - Arenasport 5 - Arenasport 6 - Arenasport 7 - Arenasport 8 - Arenasport 9 - Arenasport 10 - Aurora TV - BBC Earth - BHT 1 - Cartoonito - Cinemax 2 - Cinemax - CineStar TV 1 - CineStar TV Action & Thriller - CineStar TV Fantasy - CineStar TV Premiere 1 - CineStar TV Premiere 2 - CMC - Croatian Music Channel - Crime & Investigation - Da Vinci - DM SAT - Doma TV - E! Entertainment - Epic Drama - FTV - STAR - STAR Crime - STAR Life - STAR Movies - Happy - Hayat - HRT 1 - HRT 2 - HRT 3 - HRT 4 - Jugoton - KiKa - Kino TV - Klasik TV - GP1 - Laudato TV - Balkan Trip - M1 Film - M1 Gold - Maria Vision Međugorje - Mediaset Italia - Mini TV - MTV 80s - MTV Hits - N1 - bravo! TV - National Geographic - Nat Geo Wild - Nickelodeon engleski - Nick Jr. engleski - NickMusic - NickToons - Nova TV - OTV Valentino - Pickbox TV - Pink BH - Pink Extra - Pink Fashion - Pink Film - Pink Folk 1 - Pink Koncert - Pink M - Pink Music 2 - Pink Music - Pink Plus - Pink - Pink World - Private TV - ProSieben - RTL 2 - RTL njemački - RTL - RTL Crime - RTL Kockica - RTL Living - RTL Passion - RTL 2 njemački - RTS 1 - RTS 2 - RTS 3 - RTS Svet - Sportska televizija - Super RTL - TRT WORLD - TVCG MNE - TVE Internacional - TV Koper - Capodistria - TV SLO 1 - TV SLO 2 - Viasat Explore - Viasat History - Viasat Nature - TV 1000 - VOX - Woman - Z1 - Zdrava TV - RAI 1 - RAI 2 - RAI 3 - RAI Scuola - diff --git a/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.config.js b/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.config.js deleted file mode 100644 index 3dea9ef47..000000000 --- a/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.config.js +++ /dev/null @@ -1,60 +0,0 @@ -const dayjs = require('dayjs') - -module.exports = { - site: 'maxtv.hrvatskitelekom.hr', - days: 2, - url: 'https://player.maxtvtogo.tportal.hr:8082/OTT4Proxy/proxy/epg/shows', - request: { - method: 'POST', - data: function ({ channel, date }) { - return { - channelList: [channel.site_id], - startDate: date.unix(), - endDate: date.add(1, 'd').unix() - } - } - }, - parser: function ({ content, channel }) { - const programs = [] - const items = parseItems(content, channel) - items.forEach(item => { - if (item.showId == -1) return - programs.push({ - title: item.title, - category: item.category, - start: dayjs.unix(item.startTime), - stop: dayjs.unix(item.endTime) - }) - }) - - return programs - }, - async channels() { - const axios = require('axios') - const data = await axios - .get('https://player.maxtvtogo.tportal.hr:8082/OTT4Proxy/proxy/epg/channels') - .then(r => r.data) - .catch(console.log) - - return data.data.channels.map(item => { - return { - lang: 'hr', - site_id: item.channelId, - name: item.title - } - }) - } -} - -function parseContent(content, channel) { - const json = JSON.parse(content) - if (!Array.isArray(json.data)) return null - - return json.data.find(i => i.channelId == channel.site_id) -} - -function parseItems(content, channel) { - const data = parseContent(content, channel) - - return data && Array.isArray(data.shows) ? data.shows : [] -} diff --git a/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.test.js b/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.test.js deleted file mode 100644 index aedeeacb7..000000000 --- a/sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.test.js +++ /dev/null @@ -1,53 +0,0 @@ -const { parser, url, request } = require('./maxtv.hrvatskitelekom.hr.config.js') -const dayjs = require('dayjs') -const utc = require('dayjs/plugin/utc') -const customParseFormat = require('dayjs/plugin/customParseFormat') -dayjs.extend(customParseFormat) -dayjs.extend(utc) - -const date = dayjs.utc('2021-11-16', 'YYYY-MM-DD').startOf('d') -const channel = { - site_id: '316', - xmltv_id: '24KitchenCroatia.hr' -} -const content = - '{"status":{"code":200,"message":"OK","authType":"Unauthenticated","ottSessionToken":null},"data":[{"channelId":"316","title":"24Kitchen","logo":"http://ottepg5.nexttv.ht.hr:33200/EPG/jsp/images/universal/film/logo/fileEntity/20161109/000200/XTV100002173/493d03f8-0f08-4932-8371-e5b57d96f17d.png","chanNumber":500,"hasCatchup":false,"ottChannel":true,"userSubscribed":false,"shows":[{"showId":"-1","title":"Nema informacija","startTime":1636952400,"endTime":1636967400,"category":"ostalo","hasReminder":false,"hasRecording":false,"hasSeriesRecording":false,"userOttPlayable":false,"userLocked":false,"isPPV":false,"buyPrice":""},{"showId":"17298142","title":"Najčudniji svjetski restorani","startTime":1636952400,"endTime":1636952700,"category":"Kulinarski","hasReminder":false,"hasRecording":false,"hasSeriesRecording":false,"userOttPlayable":false,"userLocked":false,"isPPV":false,"buyPrice":""}]}]}' - -it('can generate valid url', () => { - expect(url).toBe('https://player.maxtvtogo.tportal.hr:8082/OTT4Proxy/proxy/epg/shows') -}) - -it('can generate valid request data', () => { - expect(request.data({ channel, date })).toMatchObject({ - channelList: ['316'], - startDate: 1637020800, - endDate: 1637107200 - }) -}) - -it('can parse response', () => { - const result = parser({ channel, content }).map(p => { - p.start = p.start.toJSON() - p.stop = p.stop.toJSON() - return p - }) - - expect(result).toMatchObject([ - { - start: '2021-11-15T05:00:00.000Z', - stop: '2021-11-15T05:05:00.000Z', - title: 'Najčudniji svjetski restorani', - category: 'Kulinarski' - } - ]) -}) - -it('can handle empty guide', () => { - const result = parser({ - date, - channel, - content: - '{"status":{"code":200,"message":"OK","authType":"Unauthenticated","ottSessionToken":null},"data":[]}' - }) - expect(result).toMatchObject([]) -}) diff --git a/sites/maxtv.hrvatskitelekom.hr/readme.md b/sites/maxtv.hrvatskitelekom.hr/readme.md deleted file mode 100644 index 3f528ab98..000000000 --- a/sites/maxtv.hrvatskitelekom.hr/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# maxtv.hrvatskitelekom.hr - -https://maxtv.hrvatskitelekom.hr/#/epg - -### Download the guide - -```sh -npm run grab --- --site=maxtv.hrvatskitelekom.hr -``` - -### Update channel list - -```sh -npm run channels:parse --- --config=./sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.config.js --output=./sites/maxtv.hrvatskitelekom.hr/maxtv.hrvatskitelekom.hr.channels.xml -``` - -### Test - -```sh -npm test --- maxtv.hrvatskitelekom.hr -```