From 43645e39c5a0715dff9e7d406b82364c1f006bc6 Mon Sep 17 00:00:00 2001 From: Toha Date: Thu, 30 Apr 2026 09:45:38 +0700 Subject: [PATCH 1/3] Fix `tivie.id` program description and update channels. Signed-off-by: Toha --- sites/tivie.id/__data__/content.html | 3033 +++++++++++++++--------- sites/tivie.id/__data__/program01.html | 290 ++- sites/tivie.id/__data__/program02.html | 292 ++- sites/tivie.id/tivie.id.channels.xml | 29 +- sites/tivie.id/tivie.id.config.js | 43 +- sites/tivie.id/tivie.id.test.js | 38 +- 6 files changed, 2362 insertions(+), 1363 deletions(-) diff --git a/sites/tivie.id/__data__/content.html b/sites/tivie.id/__data__/content.html index f6caa1966..e52f1119d 100644 --- a/sites/tivie.id/__data__/content.html +++ b/sites/tivie.id/__data__/content.html @@ -1,15 +1,853 @@ - -
-
-
-
-
- -
-
    + + + + Jadwal Acara AXN 29 April 2026 | TiViE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +

    Jadwal Acara AXN 29 April 2026

    +
    +
    + +
    + + +

    AXN merupakan channel televisi satelit dan/atau kabel. Perlu berlangganan untuk yang dapat menyaksikan channel ini.

    + +

    Siaran AXN bisa disaksikan melalui penyedia layanan televisi berikut:

    + +
    +
    +
    Parabola
    +
      +
    • +
      +
      + MNC Vision +
      + + Channel #438 + +
      +
    • +
    • +
      +
      + K-Vision +
      + + + +
      +
    • +
    • +
      +
      + Nex Parabola +
      + + + +
      +
    • +
    • +
      +
      + TransVision +
      + + Channel #301 + +
      +
    • +
    +
    +
    +
    Kabel/IPTV
    +
      +
    • +
      +
      + First Media +
      + + Channel #51 + +
      +
    • +
    • +
      +
      + IndiHome +
      + + Channel #509 + +
      +
    • +
    • +
      +
      + MNC Play +
      + + Channel #79 + +
      +
    • +
    • +
      +
      + MyRepublic +
      + + Channel #201 + +
      +
    • +
    +
    +
    +
    Internet/OTT
    +
      +
    • +
      +
      + MAXStreamTV +
      + + + +
      +
    • +
    • +
      +
      + Vision+ +
      + + + +
      +
    • +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + + +
    + + +
    + -
    -
    -
    -
    -
    +
    + + + + + + +
  • + + + +
  • +
  • + +
    +
    + 23:30 + + + WIB +
    +
    +
    + + + The Rainmaker, Ep. 1 + + +
    + + +
    +
    +
  • + + +
+
+
+ +
+
+
+
+ +
+

TiViE - Jadwal program acara televisi.

+

Made with in East Java 61353.

+
+
+ + + + + + + + + \ No newline at end of file diff --git a/sites/tivie.id/__data__/program01.html b/sites/tivie.id/__data__/program01.html index 973e0511a..9b0c4fcd2 100644 --- a/sites/tivie.id/__data__/program01.html +++ b/sites/tivie.id/__data__/program01.html @@ -1,102 +1,204 @@ - -
-
-
-
-
-
- -
-
-
- Film -
-

White House Down

-

2013

-
-

Saat melakukan tur di Gedung Putih bersama putrinya yang masih kecil, seorang perwira polisi - beraksi untuk melindungi anaknya dan presiden dari sekelompok penjajah paramiliter - bersenjata lengkap.

-
-
- - - -
-
-

Terakhir Tayang

- -
-
-
-
+ + +
+
+
+ +
+ +
+
+ Serial +
+ +

The Hunting Party S1

+

Episode 3

+ +
+

Di pedalaman Montana, tim memburu seorang pembunuh berantai nan kejam bernama Lowe yang terobsesi dengan kawanan serigala.

+
+ +
+ + + +
+ + +
+

Terakhir Tayang

+ + +
+ + +
+ + + + +
+
+
+
+ +
+

TiViE - Jadwal program acara televisi.

+

Made with in East Java 61353.

+
+
+ + + + + + + + + \ No newline at end of file diff --git a/sites/tivie.id/__data__/program02.html b/sites/tivie.id/__data__/program02.html index 5233f2b0a..1a6b319d9 100644 --- a/sites/tivie.id/__data__/program02.html +++ b/sites/tivie.id/__data__/program02.html @@ -1,106 +1,204 @@ - -
-
-
+ +
+
+
+ +
+ +
+
+ Serial +
+ +

The Rookie S7

+

Episode 6

+ +
+

Grey memberi Tim dan Lucy suatu tugas yang tak menyenangkan, sementara John dan Celina melacak keberadaan seorang gadis yang menghilang. Beberapa hubungan asmara berakhir di suatu acara amal.

+
+ +
+ + + +
+ + +
+

Terakhir Tayang

+ + +
+ + +
+ + + + +
+
+
+
+ +
+

TiViE - Jadwal program acara televisi.

+

Made with in East Java 61353.

+
+
+ + + + + + + + + \ No newline at end of file diff --git a/sites/tivie.id/tivie.id.channels.xml b/sites/tivie.id/tivie.id.channels.xml index 895c50459..361df4348 100644 --- a/sites/tivie.id/tivie.id.channels.xml +++ b/sites/tivie.id/tivie.id.channels.xml @@ -3,9 +3,12 @@ ANTV AXN beIN Sports 1 - beIN Sports 2 + beIN Sports 2 beIN Sports 3 BTV + CCM + Celestial Movies + CinemaWorld Cinemax CNN Galaxy @@ -18,31 +21,39 @@ HBO Signature HITS HITS Movies - HITS Now + HITS Now + IMC Indosiar iNews + KIX Kompas TV + K-Plus Lifetime - MDTV Mentari TV Metro TV MNC TV Moji + MDTV Nusantara TV - RCTI - Rock Action - Rock Entertainment + ONE RTV + RCTI + Rock Entertainment + Rock Action SCTV - SEA Today Sindonews TV + Sin Po TV + SpoTV2 SpoTV - SpoTV 2 + Studio Universal + Thrill Trans7 Trans TV tvN tvN Movies TvOne - TVRI + TVRI + VTV + Warner TV Zee Bioskop diff --git a/sites/tivie.id/tivie.id.config.js b/sites/tivie.id/tivie.id.config.js index ed3bda766..39ecf7182 100644 --- a/sites/tivie.id/tivie.id.config.js +++ b/sites/tivie.id/tivie.id.config.js @@ -68,23 +68,28 @@ module.exports = { }) if (queues.length) { await doFetch(queues, (queue, res) => { - const $ = cheerio.load(res) - const img = $('#main-content > div > div:nth-child(1) img') - const info = $('#main-content > div > div:nth-child(2)') - const title = parseText(info.find('h2:nth-child(2)')) - if (!queue.i.title.startsWith(title) && !queue.i.title.startsWith('LIVE ')) { - queue.i.subTitle = parseText(info.find('h2:nth-child(2)')) + if (res) { + const $ = cheerio.load(res) + const info = $('#main-content > div > div:nth-child(2)') + // program description + const desc = info.find('div[class=""] > p') + if (desc.length) { + desc.find('.hidden') + .toArray() + .forEach(el => $(el).remove()) + queue.i.description = parseText(desc) + } + // program categories + const cat = info.find('div[class=""] > a') + if (cat.length) { + queue.i.categories = parseText(cat).split(', ') + } + // program image + const img = $('#main-content > div > div:nth-child(1) img') + if (img.length) { + queue.i.image = img.attr('src') + } } - const desc1 = parseText(info.find('div[class=""]:nth-child(3)')) - const desc2 = parseText(info.find('div[class=""]:nth-child(4)')) - if (desc2 == '') { - queue.i.description = desc1.replace('TiViE.id | ', '') - } else { - queue.i.description = desc2.replace('TiViE.id | ', '') - queue.i.date = parseText(info.find('h2:nth-child(3)')) - } - queue.i.categories = parseText(info.find('div[class=""]:nth-child(1)')).split(', ') - queue.i.image = img.length ? img.attr('src') : null }) } // fill start-stop @@ -118,7 +123,7 @@ module.exports = { const url = $item.attr('href') return { lang, - site_id: url.substr(url.lastIndexOf('/') + 1), + site_id: url.substr(url.lastIndexOf('/') + 1, url.lastIndexOf('?') - url.lastIndexOf('/') - 1), name: $item.find('strong').text() } }) @@ -130,8 +135,8 @@ module.exports = { function parseText($item) { let text = $item.text().replace(/\t/g, '').replace(/\n/g, ' ').trim() while (true) { - if (text.match(/\s\s/)) { - text = text.replace(/\s\s/g, ' ') + if (text.match(/\s{2,}/)) { + text = text.replace(/\s{2,}/g, ' ') continue } break diff --git a/sites/tivie.id/tivie.id.test.js b/sites/tivie.id/tivie.id.test.js index dcc4e0ee5..cc609121a 100644 --- a/sites/tivie.id/tivie.id.test.js +++ b/sites/tivie.id/tivie.id.test.js @@ -11,7 +11,7 @@ dayjs.extend(utc) jest.mock('axios') -const date = dayjs.utc('2024-12-31').startOf('d') +const date = dayjs.utc('2026-04-29').startOf('d') const channel = { site_id: 'axn', xmltv_id: 'AXN.id', @@ -20,8 +20,8 @@ const channel = { axios.get.mockImplementation(url => { const urls = { - 'https://tivie.id/film/white-house-down-nwzDnwz9nAv6': 'program01.html', - 'https://tivie.id/program/hudson-rex-s6-e14-nwzDnwvBmQr9': 'program02.html' + 'https://tivie.id/program/the-hunting-party-e3-nwzDnwrCmAnB?utm_source=tivie&utm_medium=referral&utm_campaign=channel_detail&utm_content=button': 'program01.html', + 'https://tivie.id/program/the-rookie-s7-e6-nwzDnwv6mwzC?utm_source=tivie&utm_medium=referral&utm_campaign=channel_detail&utm_content=button': 'program02.html' } let data = '' if (urls[url] !== undefined) { @@ -31,7 +31,7 @@ axios.get.mockImplementation(url => { }) it('can generate valid url', () => { - expect(url({ channel, date })).toBe('https://tivie.id/channel/axn/20241231') + expect(url({ channel, date })).toBe('https://tivie.id/channel/axn/20260429') }) it('can parse response', async () => { @@ -42,26 +42,30 @@ it('can parse response', async () => { return p }) - expect(results.length).toBe(27) + expect(results.length).toBe(28) expect(results[0]).toMatchObject({ - start: '2024-12-30T17:00:00.000Z', - stop: '2024-12-30T17:05:00.000Z', - title: 'White House Down', + start: '2026-04-28T17:00:00.000Z', + stop: '2026-04-28T17:25:00.000Z', + title: 'The Hunting Party S1, Ep. 3', description: - 'Saat melakukan tur di Gedung Putih bersama putrinya yang masih kecil, seorang perwira polisi beraksi untuk melindungi anaknya dan presiden dari sekelompok penjajah paramiliter bersenjata lengkap.', + 'Di pedalaman Montana, tim memburu seorang pembunuh berantai nan kejam bernama Lowe yang terobsesi dengan kawanan serigala.', image: - 'https://i0.wp.com/is3.cloudhost.id/tivie/poster/2023/09/65116c78791c2-1695640694.jpg?resize=480,270' + 'https://i0.wp.com/is3.cloudhost.id/tivie/poster/2025/10/68e9d54962c8f-1760154953.jpg?resize=480,270', + categories: ['Serial'], + season: 1, + episode: 3 }) expect(results[2]).toMatchObject({ - start: '2024-12-30T18:00:00.000Z', - stop: '2024-12-30T18:55:00.000Z', - title: 'Hudson & Rex S6, Ep. 14', + start: '2026-04-28T18:20:00.000Z', + stop: '2026-04-28T19:15:00.000Z', + title: 'The Rookie S7, Ep. 6', description: - 'Saat guru musik Jesse terbunuh di studio rekamannya, Charlie dan Rex menghubungkan kejahatan tersebut dengan pembunuhan yang tampaknya tak ada hubungannya.', + 'Grey memberi Tim dan Lucy suatu tugas yang tak menyenangkan, sementara John dan Celina melacak keberadaan seorang gadis yang menghilang. Beberapa hubungan asmara berakhir di suatu acara amal.', image: - 'https://i0.wp.com/is3.cloudhost.id/tivie/poster/2024/07/668b7ced47b25-1720417517.jpg?resize=480,270', - season: 6, - episode: 14 + 'https://i0.wp.com/is3.cloudhost.id/tivie/poster/2025/01/677a9f2fb4b5f-1736089391.jpg?resize=480,270', + categories: ['Serial'], + season: 7, + episode: 6 }) }) From cd9de838b272e1ea68744cee1605f22bd943aa5e Mon Sep 17 00:00:00 2001 From: Toha Date: Thu, 30 Apr 2026 10:41:07 +0700 Subject: [PATCH 2/3] Update MDTV XMLTV id. Signed-off-by: Toha --- sites/tivie.id/tivie.id.channels.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tivie.id/tivie.id.channels.xml b/sites/tivie.id/tivie.id.channels.xml index 361df4348..c233fd09a 100644 --- a/sites/tivie.id/tivie.id.channels.xml +++ b/sites/tivie.id/tivie.id.channels.xml @@ -29,11 +29,11 @@ Kompas TV K-Plus Lifetime + MDTV Mentari TV Metro TV MNC TV Moji - MDTV Nusantara TV ONE RTV From 351ddb4aabbb68fdd016d4806f4a84fec4963b2e Mon Sep 17 00:00:00 2001 From: Toha Date: Thu, 30 Apr 2026 13:04:54 +0700 Subject: [PATCH 3/3] Update HBO Asia XMLTV id. Signed-off-by: Toha --- sites/tivie.id/tivie.id.channels.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tivie.id/tivie.id.channels.xml b/sites/tivie.id/tivie.id.channels.xml index c233fd09a..644a1cf5e 100644 --- a/sites/tivie.id/tivie.id.channels.xml +++ b/sites/tivie.id/tivie.id.channels.xml @@ -15,7 +15,7 @@ Galaxy Premium Garuda TV GTV - HBO + HBO HBO Family HBO Hits HBO Signature