From 7bd136daceae23a13d133422a02f659e760ec8f4 Mon Sep 17 00:00:00 2001 From: Toha Date: Sun, 5 Nov 2023 20:03:56 +0700 Subject: [PATCH 1/7] Update indihometv.com channels. Signed-off-by: Toha --- .../indihometv.com.channels.xml | 69 +++++++------------ sites/indihometv.com/indihometv.com.config.js | 22 ++++++ 2 files changed, 46 insertions(+), 45 deletions(-) diff --git a/sites/indihometv.com/indihometv.com.channels.xml b/sites/indihometv.com/indihometv.com.channels.xml index b1b4564a..26150990 100644 --- a/sites/indihometv.com/indihometv.com.channels.xml +++ b/sites/indihometv.com/indihometv.com.channels.xml @@ -1,41 +1,19 @@ - - - - - - - - - - - - - - - - - - - - - - ABC Australia Aljazeera Animax ANIPlus + Antara ANTV Arirang Asian Food Network ATV AXN - Baby First Bali TV beIN Sports 1 beIN Sports 3 - Berita Satu + BTV Bioskop Indonesia Bloomberg Boomerang @@ -45,7 +23,7 @@ CGTN Documentary Cinema World Citra Dangdut - Citra Drama + Citra Drama News Asia CNBC Asia CNBC Indonesia @@ -54,6 +32,7 @@ Crime Investigation CTI Asia Daai TV + Da Vinci Learning Discovery Channel Dreamworks Dunia anak @@ -61,20 +40,24 @@ DW (English) Eat N Go EBC Asia - egg network Euronews FashionTV Fight Sport + Flik France 24 + Formosa Galaxy Galaxy Premium + SGEM HGTV History + Hits + HITS Now Horee Horizon Sports IDX IMC - IndiKids + FunPlanet Indonesiana TV Indosiar iNews @@ -85,46 +68,42 @@ Kix Kompas TV Kplus + Kungfu TV Lifetime Lingua + Maxstream Mentari TV Metro TV - MNC News + SINDO News TV MQTV - M Shop - MTATV MTV Live My Cinema My Cinema Asia My Family MyKidz - Nat Geo - Nat Geo Wild NBA Net. NHK World Japan - NHK World Premium Nickelodeon Nick Junior Insert Nusantara TV - O Channel + MOJI SONE - Outdoor Channel Paramount - Rajawali TV + Prambors + AlQuran Kareem + RTV Rock Entertainment - Rock Extreme + Rock Action Rodja TV RRI NET - Ruang Trampil SCTV SEA Today Seru! - SPOTV + Shenzen SPOTV2 - Star Chinese Channel - Star Chinese Movies + SPOTV Tawaf TV Tech Storm Thrill @@ -135,16 +114,16 @@ TV5Monde TV9 NU TVBS News - TV Edukasi MUI TV TVN TVN Movies TV One TVRI UChannel - Usee Photo - UseePrime + AllPlay Ent + UseeSports2 + UseeSports Warner ZBioskop Zhejiang - \ No newline at end of file + diff --git a/sites/indihometv.com/indihometv.com.config.js b/sites/indihometv.com/indihometv.com.config.js index 57712c2c..5aecd215 100644 --- a/sites/indihometv.com/indihometv.com.config.js +++ b/sites/indihometv.com/indihometv.com.config.js @@ -38,6 +38,28 @@ module.exports = { }) return programs + }, + async channels() { + const axios = require('axios') + const cheerio = require('cheerio') + const data = await axios + .get('https://www.indihometv.com/tvod') + .then(response => response.data) + .catch(console.error) + + const $ = cheerio.load(data) + const items = $('#channelContainer a.channel-item').toArray() + const channels = items.map(item => { + const $item = $(item) + + return { + lang: 'id', + site_id: $item.data('url').substr($item.data('url').lastIndexOf('/') + 1), + name: $item.data('name') + } + }) + + return channels } } From cb7aa76810adfecdfb354c31cb8e53374436a061 Mon Sep 17 00:00:00 2001 From: Toha Date: Sun, 5 Nov 2023 21:14:34 +0700 Subject: [PATCH 2/7] Update firstmedia.com channels. Signed-off-by: Toha --- .../firstmedia.com.channels.xml | 152 ++++-------------- sites/firstmedia.com/firstmedia.com.config.js | 23 +++ 2 files changed, 52 insertions(+), 123 deletions(-) diff --git a/sites/firstmedia.com/firstmedia.com.channels.xml b/sites/firstmedia.com/firstmedia.com.channels.xml index 6bdba625..5785dd3a 100644 --- a/sites/firstmedia.com/firstmedia.com.channels.xml +++ b/sites/firstmedia.com/firstmedia.com.channels.xml @@ -1,183 +1,89 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + ABC Australia - Al Jazeera Arabic Al Jazeera International - Al Quran Al Kareem Sunnah TV - ANHUI TV Animal Planet Animax ANTV Arirang - Asian Food Network AXN - BabyFirst - Berita Satu - Berita Satu World - BLOOMBERG TELEVISION - Boomerang HD + BBC World News + BTV + Bloomberg Cartoon Network CCTV 4 - Celestial Movie CGTN - CGTN Documentary HD - Champions TV 1 Champions TV 2 - Champions TV 3 - Champions TV 4 SD - Cinema World HD - Cinemax - Citra Biskop HD - Citra Dangdut HD - CItra Drama HD - Citra Entertainment HD - Citra Muslim HD + Champions TV 2 HD Channel News Asia - Crime Investigation HD + CNN International DAAI TV - Da Vinci HD - Discovery Asia HD - Discovery Channel - DMAX HD - Dragon TV - Dream Works HD DW Deutsch - DW English - eGG Channel Euronews + Eurosport + Eurosport HD Eternal Word Television Network (EWTN)) Fashion TV - Food Network HD Fox News France 24 - Galaxy HD - Galaxy Premium HD Garuda TV - GEM - GMS Channel GTV HBO + HBO HD HBO Family + HBO Family HD HBO Hits + HBO Hits HD HBO Signature - HGTV HD - History HD + HBO Signature HD HITS HD HITS MOVIES HD - Horee! HD + HITS Now HD Hunan TV - IDX Channel HD + Investor Daily IMC - Indosiar - iNews - Jakarta TV - Jak TV Jiangsu TV Jawa Pos Media Televisi - JTV KBS World - KIX HD Kompas TV - Lifetime HD - Love Nature 4K - Love Nature HD - Metro Globe Network - MGN Metro TV MNC News - MTV Asia - MTV Live HD - MyZen TV HD - National Geographic Channel - National Geographic Wild - NET. - NHK World Japan HD + MTV 90s NHK World Premium - Nickelodeon Nick jr. - O Channel + MOJI ONE Paramount Network HD Phoenix Chinese Channel Phoenix Info News Premier Sports - Rai Italia + Premier Sports HD Rajawali TV Reformed 21 - Rock Entertainment HD - Rock Extreme - Russia Today - SCTV - SEA Today HD + Rock Action + Shenzen TV Shine - Smithsonian HD - SPOTV SPOTV 2 - Star Chinese Channel - Star Gold + SPOTV Star Plus - Stingray Djazz HD - Stingray Festival 4K - Stingray Naturescape HD - Stingray Now 4K - TBN Asia - Tech Storm HD - The Learning Channel - TLC TRANS 7 TRANS TV - TRT World TV5 Monde - TV 5 Monde Style HD TV9 TVBS Asia - TVBS News - TVB Xing He - TVN HD - TVN Movies HD - TV One - TVRI Nasional - TV PARLEMEN - USA Today HD Wion Xing Kong China - Zee Action Zee Bioskop - Zee Bollywood Zee Cinema - ZEE TV Zhejiang TV - \ No newline at end of file + diff --git a/sites/firstmedia.com/firstmedia.com.config.js b/sites/firstmedia.com/firstmedia.com.config.js index 60039aca..12cdd715 100644 --- a/sites/firstmedia.com/firstmedia.com.config.js +++ b/sites/firstmedia.com/firstmedia.com.config.js @@ -28,6 +28,29 @@ module.exports = { }) return programs + }, + async channels() { + const axios = require('axios') + const cheerio = require('cheerio') + const result = await axios + .get(`https://api.firstmedia.com/api/content/tv-guide/list?date=${dayjs().format('DD/MM/YYYY')}&channel=&startTime=0&endTime=24`) + .then(response => response.data) + .catch(console.error) + + const channels = [] + if (result.data && result.data.entries) { + Object.values(result.data.entries).forEach(schedules => { + if (schedules.length) { + channels.push({ + lang: 'en', + site_id: schedules[0].channel.no, + name: schedules[0].channel.name + }) + } + }) + } + + return channels } } From 58213d186d976cdbe7c2b56d2364f9a899968882 Mon Sep 17 00:00:00 2001 From: Toha Date: Sun, 5 Nov 2023 22:27:44 +0700 Subject: [PATCH 3/7] Update mncvision.id channels. Signed-off-by: Toha --- sites/mncvision.id/mncvision.id.config.js | 16 +-- .../mncvision.id/mncvision.id_en.channels.xml | 100 +++++++++++------- .../mncvision.id/mncvision.id_id.channels.xml | 90 ++++++++++------ 3 files changed, 130 insertions(+), 76 deletions(-) diff --git a/sites/mncvision.id/mncvision.id.config.js b/sites/mncvision.id/mncvision.id.config.js index f33adbb8..4414fabf 100644 --- a/sites/mncvision.id/mncvision.id.config.js +++ b/sites/mncvision.id/mncvision.id.config.js @@ -64,21 +64,23 @@ module.exports = { return programs }, - async channels() { - const data = await axios + async channels({lang = 'id'}) { + const axios = require('axios') + const cheerio = require('cheerio') + const result = await axios .get('https://www.mncvision.id/schedule') .then(response => response.data) .catch(console.error) - const $ = cheerio.load(data) + const $ = cheerio.load(result) const items = $('select[name="fchannel"] option').toArray() const channels = items.map(item => { - const $item = cheerio.load(item) + const $item = $(item) return { - lang: 'id', - site_id: $item('*').attr('value'), - name: $item('*').text() + lang: lang, + site_id: $item.attr('value'), + name: $item.text().split(' - ')[0].trim() } }) diff --git a/sites/mncvision.id/mncvision.id_en.channels.xml b/sites/mncvision.id/mncvision.id_en.channels.xml index 9a2a131b..77ce513c 100644 --- a/sites/mncvision.id/mncvision.id_en.channels.xml +++ b/sites/mncvision.id/mncvision.id_en.channels.xml @@ -1,100 +1,126 @@ + + ABC Australia Aljazeera - Animal Planet - Animax Asia + Animax ANTV - Arirang - Asian Food Network + Arirang World AXN - Baby TV + AXN HD BBC Earth + BBC Earth HD BBC World News - BeIn Sports 1 - BeIn Sports 3 BTV - Besmart Bloomberg TV - Boomerang - Cartoon - CBeebies + CBeebies Asia Celestial Classic Movies Celestial Movies CGTN CGTN Documentary - Cinemax + CINEMACHI + CINEMACHI HD + CINEMACHI ACTION + CINEMACHI ACTION HD + CINEMACHI KIDS + CINEMACHI KIDS HD + CINEMACHI MAX + CINEMACHI MAX HD + CINEMACHI XTRA + CINEMACHI XTRA HD CNA CNBC - CNN International Crime + Investigation - Discovery Channel + Dreamworks DW English - Ent + Entertainment + EURONEWS Fight Sports FMN Fox News Channel France 24 Galaxy Galaxy Premium + Global Trekker GTV - HBO Asia - HBO Family Asia - HBO Hits - HBO Signature Asia - HGTV Asia + GTV HD History Hits Hits Movies + HITS MOVIES HD IDX Channel - Ie + IDX HD IMC Indosiar INews + iNews HD Jak TV Kids TV Kix Kompas TV Life - Lifestyle & Fashion - Lifetime Asia + Lifetime + Love Nature + Love Nature HD Metro TV - Miao Mi - MNC News - MNC Sports - MNC Sports 2 - MNC Sports 3 - MNC TV - M Shop Signature - M Shop Super Sale! + Sindo News TV + Sindo News TV HD + Sportstars 2 + Sportstars 2 HD + Sportstars 3 + Sportstars 4 + Sportstars 4 HD + Sportstars + Sportstars HD + MNCTV + MNCTV HD + MTV 90's + MTV LIVE Music TV Muslim TV - National Geographic - National Geographic Wild + My Cinema + My Cinema Asia + My Family + My Kidz NET NHK World Japan NHK World Premium Nickelodeon - Nick Jr Asia + Nick Jr + Nick Jr. HD OK TV One + ONE HD + Outdoor Channel + Outdoor channel HD + PARAMOUNT + PARAMOUNT HD Quran TV RCTI + RCTI HD + Rock Entertainment + Rock Action SCTV SEA Today Soccer Channel - SPOTV + Soccer Channel HD SPOTV 2 + SPOTV 2 HD + SPOTV + SPOTV HD Tawaf TV Thrill - TLC Trans 7 Trans TV tvN + tvN HD tvN Movies + tvN Movies HD TVOne TVRI Nasional + Vision Prime HD Vision Prime - Warner TV Zee Bioskop + Zoomoo diff --git a/sites/mncvision.id/mncvision.id_id.channels.xml b/sites/mncvision.id/mncvision.id_id.channels.xml index 603972ea..e0821b4b 100644 --- a/sites/mncvision.id/mncvision.id_id.channels.xml +++ b/sites/mncvision.id/mncvision.id_id.channels.xml @@ -1,100 +1,126 @@ + + ABC Australia Aljazeera - Animal Planet Animax ANTV Arirang World - Asian Food Network AXN - Baby TV + AXN HD BBC Earth + BBC Earth HD BBC World News - BeIn Sports 1 - BeIn Sports 3 BTV - Besmart Bloomberg TV - Boomerang - Cartoon Network CBeebies Asia Celestial Classic Movies Celestial Movies CGTN CGTN Documentary - Cinemax Asia + CINEMACHI + CINEMACHI HD + CINEMACHI ACTION + CINEMACHI ACTION HD + CINEMACHI KIDS + CINEMACHI KIDS HD + CINEMACHI MAX + CINEMACHI MAX HD + CINEMACHI XTRA + CINEMACHI XTRA HD CNA CNBC - CNN International Crime + Investigation - Discovery Channel + Dreamworks DW English - Ent + Entertainment + EURONEWS Fight Sports FMN Fox News Channel France 24 Galaxy Galaxy Premium + Global Trekker GTV - HBO - HBO Family - HBO Hits - HBO Signature - HGTV + GTV HD History Hits Hits Movies + HITS MOVIES HD IDX Channel - Ie + IDX HD IMC Indosiar INews + iNews HD Jak TV Kids TV Kix Kompas TV Life - Lifestyle & Fashion Lifetime + Love Nature + Love Nature HD Metro TV - Miao Mi - MNC News - MNC Sports - MNC Sports 2 - MNC Sports 3 - MNC TV - M Shop Signature - M Shop Super Sale! + Sindo News TV + Sindo News TV HD + Sportstars 2 + Sportstars 2 HD + Sportstars 3 + Sportstars 4 + Sportstars 4 HD + Sportstars + Sportstars HD + MNCTV + MNCTV HD + MTV 90's + MTV LIVE Music TV Muslim TV - National Geographic - National Geographic Wild + My Cinema + My Cinema Asia + My Family + My Kidz NET NHK World Japan NHK World Premium Nickelodeon Nick Jr + Nick Jr. HD OK TV One + ONE HD + Outdoor Channel + Outdoor channel HD + PARAMOUNT + PARAMOUNT HD Quran TV RCTI + RCTI HD + Rock Entertainment + Rock Action SCTV SEA Today Soccer Channel - SPOTV + Soccer Channel HD SPOTV 2 + SPOTV 2 HD + SPOTV + SPOTV HD Tawaf TV Thrill - TLC Trans 7 Trans TV tvN + tvN HD tvN Movies + tvN Movies HD TVOne TVRI Nasional + Vision Prime HD Vision Prime - Warner TV Zee Bioskop + Zoomoo From 353cfb22082d4e795632d1b1edfdab2a3de90160 Mon Sep 17 00:00:00 2001 From: Toha Date: Sun, 5 Nov 2023 23:24:47 +0700 Subject: [PATCH 4/7] Update vidio.com channels. Signed-off-by: Toha --- sites/vidio.com/vidio.com.channels.xml | 42 +++++++++++--------------- sites/vidio.com/vidio.com.config.js | 28 ++++++++++++++++- 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/sites/vidio.com/vidio.com.channels.xml b/sites/vidio.com/vidio.com.channels.xml index b1ab0ce1..c66f6233 100644 --- a/sites/vidio.com/vidio.com.channels.xml +++ b/sites/vidio.com/vidio.com.channels.xml @@ -1,5 +1,13 @@ + + + + + + + + ABC Australia Ajwa TV Aljazeera English @@ -7,29 +15,19 @@ Arirang World BeIn Sports 1 Indonesia BeIn Sports 3 Indonesia - Berita Satu + BTV Champions TV 1 Champions TV 2 Champions TV 3 - Champions TV 4 Champions TV 5 Champions TV 6 - Champions TV EPL - Champions TV Goal - Champions TV Xtra - Citra Bioskop - Citra Culinary & Travel - Citra Dangdut - Citra Drama - Citra Entertainment - Citra Muslim + Premier League TV CNA Da Ai TV - Da Vinci Asia DW English - EuroNews English + Elshinta TV Fashion TV Asia - Fashion TV L'Original + Fashion TV L'Original Fashion TV Midnite Secret Hip Hip Horee! Horee! @@ -39,32 +37,28 @@ JTV Kompas TV Liverpool FC TV - Magna Channel + Magna TV Makkah TV Mentari TV Metro TV - My TV NBA TV NET NHK World Japan Nusantara - O Channel - Pet TV + MOJI RTV - RANS Entertainment + RANS Channel Reformed 21 TV Rock Entertainment - Rock Extreme + Rock Action SCTV - SEA Today + Tawaf TV Trans 7 Trans TV - TV Edukasi + TVN tvOne TVRI Nasional - TV Tempo U Channel Zee Bioskop - Zing Asia Zoo Moo Asia diff --git a/sites/vidio.com/vidio.com.config.js b/sites/vidio.com/vidio.com.config.js index 3923d409..5661a27b 100644 --- a/sites/vidio.com/vidio.com.config.js +++ b/sites/vidio.com/vidio.com.config.js @@ -31,7 +31,33 @@ module.exports = { }) return programs - } + }, + async channels() { + const axios = require('axios') + const cheerio = require('cheerio') + const result = await axios + .get('https://www.vidio.com/categories/276-daftar-channel-tv-radio-live-sports') + .then(response => response.data) + .catch(console.error) + + const $ = cheerio.load(result) + const items = $('.home-content a').toArray() + const channels = [] + items.forEach(item => { + const $item = $(item) + + const name = $item.find('p').text() + if (name.toUpperCase().indexOf('FM') < 0 && name.toUpperCase().indexOf('RADIO') < 0) { + channels.push({ + lang: 'id', + site_id: $item.attr('href').substr($item.attr('href').lastIndexOf('/') + 1).split('-')[0], + name + }) + } + }) + + return channels + } } function parseStart($item, date) { From ed33315fc3a9b14a3d88e305462034ede593b372 Mon Sep 17 00:00:00 2001 From: Toha Date: Sun, 5 Nov 2023 17:04:26 +0700 Subject: [PATCH 5/7] Add site cubmu.com. Signed-off-by: Toha --- sites/cubmu.com/cubmu.com.channels.xml | 96 +++++++++++++++++++++++++ sites/cubmu.com/cubmu.com.config.js | 98 ++++++++++++++++++++++++++ sites/cubmu.com/cubmu.com.test.js | 35 +++++++++ 3 files changed, 229 insertions(+) create mode 100644 sites/cubmu.com/cubmu.com.channels.xml create mode 100644 sites/cubmu.com/cubmu.com.config.js create mode 100644 sites/cubmu.com/cubmu.com.test.js diff --git a/sites/cubmu.com/cubmu.com.channels.xml b/sites/cubmu.com/cubmu.com.channels.xml new file mode 100644 index 00000000..69b1495e --- /dev/null +++ b/sites/cubmu.com/cubmu.com.channels.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABC Australia + Al Jazeera + ANTV + Arirang + BTV + Bioskop Indonesia + Boonie Cubs TV + CCTV 4 + CGTN + CGTN Documentary + CNA + CNBC Indonesia + CNN Indonesia + DAAI TV + Duck TV + Dunia Anak + Dunia Lain + Eat N Go + English Club TV + Euronews + Fashion TV + Fight TV Premium + France 24 + Golf+ + GTV + Indosiar + Jak tv + jtv + Khazanah + Kompas TV + Lingua + MetroTV + MNC TV + Musik Indonesia + Nabawi TV + NET TV + !nsert + Nusantara + One TV + Outdoor America + Pijar TV + Gaming TV + Pro Wrestling TV + Al Quran Al Kareem + rtv + RCTI + Russia Today + SCTV + Channel Seru! + SuperYacht TV + Toon Goggles + Trans 7 + Trans TV + TV5 Monde + TV9 + tv Mu + tvOne + TVRI + Wion TV + diff --git a/sites/cubmu.com/cubmu.com.config.js b/sites/cubmu.com/cubmu.com.config.js new file mode 100644 index 00000000..a1064e52 --- /dev/null +++ b/sites/cubmu.com/cubmu.com.config.js @@ -0,0 +1,98 @@ +const dayjs = require('dayjs') +const timezone = require('dayjs/plugin/timezone') +const utc = require('dayjs/plugin/utc') + +dayjs.extend(timezone) +dayjs.extend(utc) + +module.exports = { + site: 'cubmu.com', + days: 2, + url: function ({ channel, date }) { + return `https://servicebuss.transvision.co.id/v2/cms/getEPGData?app_id=cubmu&tvs_platform_id=standalone&schedule_date=${date.format('YYYY-MM-DD')}&channel_id=${channel.site_id}` + }, + parser({ content }) { + const programs = [] + const items = parseItems(content) + items.forEach(item => { + programs.push({ + title: parseTitle(item), + description: parseDescription(item), + episode: parseEpisode(item), + start: parseStart(item).toISOString(), + stop: parseStop(item).toISOString() + }) + }) + + return programs + }, + async channels() { + const axios = require('axios') + const cheerio = require('cheerio') + const result = await axios + .get('https://cubmu.com/live-tv') + .then(response => response.data) + .catch(console.error) + + const $ = cheerio.load(result) + + // retrieve service api data + const config = JSON.parse($('#__NEXT_DATA__').text()).runtimeConfig || {} + + const options = { + headers: { + Origin: 'https://cubmu.com', + Referer: 'https://cubmu.com/live-tv' + } + } + // login to service bus + const token = await axios + .post(`https://servicebuss.transvision.co.id/tvs/login/external?email=${config.email}&password=${config.password}&deviceId=${config.deviceId}&deviceType=${config.deviceType}&deviceModel=${config.deviceModel}&deviceToken=&serial=&platformId=${config.platformId}`, options) + .then(response => response.data) + .catch(console.error) + // list channels + const subscribedChannels = await axios + .post(`https://servicebuss.transvision.co.id/tvs/subscribe_product/list?platformId=${config.platformId}`, options) + .then(response => response.data) + .catch(console.error) + + const channels = [] + if (Array.isArray(subscribedChannels.channelPackageList)) { + subscribedChannels.channelPackageList.forEach(pkg => { + channels.push(...pkg.channelList.map(channel => { + return { + lang: 'id', + site_id: channel.id, + name: channel.name + } + })) + }) + } + + return channels + } +} + +function parseItems(content) { + return content ? JSON.parse(content.trim()).result || [] : [] +} + +function parseTitle(item) { + return item.scehedule_title +} + +function parseDescription(item) { + return item.schedule_json.primarySynopsis +} + +function parseEpisode(item) { + return item.schedule_json.episodeName +} + +function parseStart(item) { + return dayjs.tz(item.schedule_date, 'YYYY-MM-DD HH:mm:ss', 'Asia/Jakarta') +} + +function parseStop(item) { + return dayjs.tz([item.schedule_date.split(' ')[0], item.schedule_end_time].join(' '), 'YYYY-MM-DD HH:mm:ss', 'Asia/Jakarta') +} diff --git a/sites/cubmu.com/cubmu.com.test.js b/sites/cubmu.com/cubmu.com.test.js new file mode 100644 index 00000000..7c9737d2 --- /dev/null +++ b/sites/cubmu.com/cubmu.com.test.js @@ -0,0 +1,35 @@ +const { url, parser } = require('./cubmu.com.config.js') +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') +dayjs.extend(utc) + +const date = dayjs.utc('2023-11-05', 'DD/MM/YYYY').startOf('d') +const channel = { site_id: '4028c68574537fcd0174be43042758d8', xmltv_id: 'TransTV.id', lang: 'id' } + +it('can generate valid url', () => { + expect(url({ channel, date })).toBe( + 'https://servicebuss.transvision.co.id/v2/cms/getEPGData?app_id=cubmu&tvs_platform_id=standalone&schedule_date=2023-11-05&channel_id=4028c68574537fcd0174be43042758d8' + ) +}) + +it('can parse response', () => { + const content = + '{"result":[{"channel_id":"4028c68574537fcd0174be43042758d8","channel_name":"Trans TV","scehedule_title":"CNN Tech News","schedule_date":"2023-11-05 01:30:00","schedule_end_time":"02:00:00","schedule_json":{"availability":0,"channelId":"4028c68574537fcd0174be43042758d8","channelName":"Trans TV","duration":1800,"editable":true,"episodeName":"","imageUrl":"https://cdnjkt2.transvision.co.id:1001/catchup/schedule/thumbnail/4028c68574537fcd0174be43042758d8/4028c6858b8b3621018b9330e3701a7e/458x640","imageUrlWide":"https://cdnjkt2.transvision.co.id:1001/catchup/schedule/thumbnail/4028c68574537fcd0174be43042758d8/4028c6858b8b3621018b9330e3701a7e/320x180","name":"CNN Tech News","ottImageUrl":"","primarySynopsis":"CNN Indonesia Tech News adalah berita teknologi yang membawa pemirsa ke dunia teknologi yang penuh dengan informasi, pendidikan, hiburan sampai informasi kesehatan terkini.","scheduleId":"4028c6858b8b3621018b9330e3701a7e","scheduleTime":"18:30:00","secondarySynopsis":"CNN Indonesia Tech News is tech news brings viewers into the world of technology that provides information, education, entertainment to the latest health information.","startDt":"20231104183000","url":""},"schedule_start_time":"01:30:00"}]}' + const results = parser({ content, channel }) + + expect(results).toMatchObject([ + { + start: '2023-11-04T18:30:00.000Z', + stop: '2023-11-04T19:00:00.000Z', + title: 'CNN Tech News', + description: + "CNN Indonesia Tech News adalah berita teknologi yang membawa pemirsa ke dunia teknologi yang penuh dengan informasi, pendidikan, hiburan sampai informasi kesehatan terkini." + } + ]) +}) + +it('can handle empty guide', () => { + const results = parser({ content: '' }) + + expect(results).toMatchObject([]) +}) From 30cf6a9bee8b787886490917eb4138f0c849666c Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Mon, 6 Nov 2023 01:10:42 +0300 Subject: [PATCH 6/7] Update SITES.md --- SITES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SITES.md b/SITES.md index ee5735e7..b0a85296 100644 --- a/SITES.md +++ b/SITES.md @@ -27,6 +27,7 @@ | compulms.com | 🟢 | | | comteco.com.bo | 🟢 | | | cosmote.gr | 🟢 | | +| cubmu.com | 🟢 | | | delta.nl | 🟢 | | | digiturk.com.tr | 🟢 | | | directv.com | 🟢 | | From 910b782ec907a50983bccbf152b86e651f5530f9 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Mon, 6 Nov 2023 01:40:46 +0300 Subject: [PATCH 7/7] Update SITES.md --- SITES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SITES.md b/SITES.md index b0a85296..533001e2 100644 --- a/SITES.md +++ b/SITES.md @@ -104,7 +104,7 @@ | programme-tv.vini.pf | 🟢 | | | programme.tvb.com | 🟢 | | | programtv.onet.pl | 🟢 | | -| proximusmwc.be | 🟢 | | +| proximusmwc.be | 🟢 | https://github.com/iptv-org/epg/issues/2212 | | raiplay.it | 🟢 | | | reportv.com.ar | 🟢 | | | rev.bs | 🟢 | |