@saurus
@saurus2 files
Published 45 minutes ago
javascript

Scraper Metadata & Streaming NontonAnimeID

Modul JavaScript untuk mengambil data anime, poster, dan sinkronisasi dari situs NontonAnimeID. Mendukung fitur pencarian kata kunci dan pengambilan daftar anime terbaru/ongoing.

Raw
README.md โ€” Dokumentasi & Panduan
Markdown

NontonAnimeID โ€” Full Website Scraper & Reverse Engineering Documentation

NontonAnimeID - Anime Streaming & Metadata Scraper
Creator: SAURUS
Base: https://s13.nontonanimeid.boats
Saluran: https://whatsapp.com/channel/0029VbDhTC6KLaHjHKXl552C
Note: pliss guys jangan di klaim 100% buatan lu, lu boleh kok modifikasi trs share lagi tapi tolong jangan ilangin header creator sama ch-nya

Modul client library murni Node.js ESM (Zero Dependency, Strict Zero Comment, Native Fetch) untuk mengeksploitasi seluruh fitur konten publik, metadata, navigasi episode, kalender rilis harian, dan arsitektur stream player dari portal streaming NontonAnimeID (s13.nontonanimeid.boats).


๐Ÿ“Œ Ringkasan Reverse-Engineering & Arsitektur

1. Dual Layer Arsitektur: WordPress Kotakanime Theme

  • Frontend Portal: Dibangun di atas WordPress dengan tema custom performa tinggi bernama kotakanime.
  • Rendering & Navigation: Halaman katalog dan detail episode menggunakan struktur hybrid HTML SSR dipadukan dengan modular vanilla JS (preferences.js, history.js, marathon.js, front.ajax.js).
  • Caching & Web Server: Ditenagai oleh LiteSpeed Web Server (x-litespeed-cache: hit) dan didistribusikan melalui jaringan CDN Cloudflare (server: cloudflare, cf-cache-status: DYNAMIC).

2. Arsitektur Video Player & Multi-Server Injection

Pada halaman penayangan episode (/{slug}-episode-{n}/), kontainer video player tidak disematkan statis melainkan dimuat dinamis via AJAX ke elemen <div id="videoku"></div>:

  • Player AJAX Endpoint: POST /wp-admin/admin-ajax.php
  • Action Identifier: action=player_ajax
  • Dinamika Token Nonce: Parameter nonce di-generate dinamis di setiap request halaman dalam skrip inline base64 (var kotakajax = { ... }).
  • Multi-Server Tabs:
    • S-Lokal-c (data-type="Lokal-c", data-nume="1")
    • S-Kotakvideo (data-type="Kotakvideo", data-nume="2")
    • S-Nontonku (data-type="Nontonku", data-nume="3")
    • S-Nonton (data-type="Nonton", data-nume="4")
    • S-Lokal-1080 (data-type="Lokal-1080", data-nume="5")

3. Proteksi Cloudflare & Device Token (_kotak_did)

  • Mekanisme Cooldown: Client dibatasi timer cooldown otomatis pada header Retry-After jika berganti server terlalu cepat.
  • Device Token Verification: Respon server menerbitkan token perangkat via header X-Kotak-Device-Token atau cookie _kotak_did.
  • Challenge Gate: Jika request dikirim tanpa sesi terverifikasi, server merespons dengan HTTP 429/403 dan header X-Kotak-Challenge: required, yang memicu pengalihan ke URL tantangan Cloudflare Managed Challenge (/?kotak_player_challenge=1).

๐Ÿ› ๏ธ Panduan Penggunaan Modul (index.js)

Modul ini murni ESM (.js) tanpa dependensi luar (menggunakan native fetch).

1. Eksekusi Cepat via Terminal (CLI)

# 1. Mengambil Anime Rilisan Terbaru di Homepage
node index.js latest

# 2. Pencarian Judul Anime
node index.js search naruto

# 3. Detail Anime Lengkap & Seluruh Daftar Episode
node index.js detail diamond-no-ace-act-ii-second-season-part-2

# 4. Detail Episode & Pengambilan Daftar Server Player
node index.js episode diamond-no-ace-act-ii-second-season-part-2-episode-7

# 5. Mengambil Kalender Jadwal Rilis Lengkap (Senin - Minggu)
node index.js schedule

2. Penggunaan Programatis (Import di Kode Anda)

import { latest, search, detail, episode, schedule } from './index.js';

// 1. Mengambil Anime Rilisan Terbaru di Halaman 1
const rilisanTerbaru = await latest(1);
console.log('Total rilis:', rilisanTerbaru.total);
console.log('Anime pertama:', rilisanTerbaru.results[0]);

// 2. Pencarian Anime
const hasilPencarian = await search('One Piece');
console.log('Hasil pencarian:', hasilPencarian.results);

// 3. Detail Series Lengkap & Daftar Episode
const detailAnime = await detail('one-piece');
console.log('Judul:', detailAnime.data.title);
console.log('Sinopsis:', detailAnime.data.synopsis);
console.log('Daftar Episode:', detailAnime.data.episodes);

// 4. Detail Episode & Parameter Server Player
const infoEpisode = await episode('diamond-no-ace-act-ii-second-season-part-2-episode-7');
console.log('Server yang tersedia:', infoEpisode.data.servers);
console.log('Nonce & Endpoint AJAX:', infoEpisode.data.ajaxEndpoint, infoEpisode.data.nonce);

// 5. Kalender Jadwal Rilis Mingguan
const jadwal = await schedule();
for (const hari of jadwal.days) {
    console.log(`=== ${hari.day} (${hari.date}) - ${hari.count} Anime ===`);
    console.log(hari.items.map(i => `${i.time || 'TBA'} - ${i.title}`));
}

๐Ÿ“‹ Daftar API Lengkap dalam Modul

Function / Method Parameter Tipe Nilai Kembali Deskripsi
latest(page) page = 1 Promise<Object> Mengambil daftar rilisan anime terbaru di homepage atau halaman pagination tertentu
search(query) query: string Promise<Object> Pencarian judul anime dengan ekstraksi poster, rating bintang, tipe seri, dan sinopsis
detail(urlOrSlug) urlOrSlug: string Promise<Object> Mengambil metadata lengkap seri anime, skor, genre, sinopsis, dan seluruh daftar episode
episode(urlOrSlug) urlOrSlug: string Promise<Object> Mengambil info episode, link episode sebelumnya/berikutnya, serta konfigurasi server player (post, nume, serverName, nonce)
schedule() - Promise<Object> Mengambil seluruh kalender jadwal rilis anime mingguan yang dikelompokkan dari Senin hingga Minggu

โš–๏ธ Lisensi & Disclaimer

Proyek ini dibuat murni untuk tujuan edukasi, interoperabilitas data, dan analisis arsitektur website publik. Seluruh hak cipta konten anime, gambar, dan merek dagang milik masing-masing pemilik hak cipta.

index.jsjavascriptยท 454 lines ยท 17.2 KB
#!/usr/bin/env node/** * NontonAnimeID - Anime Streaming & Metadata Scraper * Creator: SAURUS * Base: https://s13.nontonanimeid.boats * Saluran: https://whatsapp.com/channel/0029VbDhTC6KLaHjHKXl552C * Note: pliss guys jangan di klaim 100% buatan lu, lu boleh kok modifikasi trs share lagi tapi tolong jangan ilangin header creator sama ch-nya */ 'use strict'; const BASE_URL = 'https://s13.nontonanimeid.boats';const CREATOR = 'SAURUS';const SALURAN = 'https://whatsapp.com/channel/0029VbDhTC6KLaHjHKXl552C'; const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'; async function request(url, options = {}) {    const { method = 'GET', headers = {}, body = undefined, timeout = 15000 } = options;    const res = await fetch(url, {        method,        headers: {            'User-Agent': USER_AGENT,            'Accept': 'text/html,application/xhtml+xml,application/json;q=0.9,*/*;q=0.8',            'Accept-Language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7',            ...headers        },        body,        signal: AbortSignal.timeout(timeout)    });    if (!res.ok) {        throw new Error(`HTTP ${res.status} on ${url}`);    }    return await res.text();} function cleanText(text = '') {    return text        .replace(/<span\b[^>]*dashicons[^>]*>[\s\S]*?<\/span>/gi, '')        .replace(/<[^>]+>/g, ' ')        .replace(/&#8211;/g, 'โ€“')        .replace(/&#8217;/g, "'")        .replace(/&amp;/g, '&')        .replace(/&quot;/g, '"')        .replace(/&#39;/g, "'")        .replace(/&lt;/g, '<')        .replace(/&gt;/g, '>')        .replace(/\s+/g, ' ')        .trim();} /** * 1. Ambil episode rilisan terbaru di Homepage (Episode Terbaru) */async function latest(page = 1) {    const url = page > 1 ? `${BASE_URL}/page/${page}/` : `${BASE_URL}/`;    const html = await request(url);    const results = [];     // Prioritas 1: Ambil section "Episode Terbaru" (<article class="animeseries post-...">)    const articles = [...html.matchAll(/<article\b[^>]*class=["']([^"']*animeseries[^"']*)["'][^>]*>([\s\S]*?)<\/article>/gi)];     for (const a of articles) {        const block = a[2];        const linkMatch = block.match(/<a\b[^>]*href=["']([^"']+)["']/i);        const imgMatch = block.match(/<img\b[^>]*src=["']([^"']+)["']/i);        const titleMatch = block.match(/class=["'][^"']*entry-title[^"']*["'][^>]*>([\s\S]*?)<\/h3>/i) ||                           block.match(/alt=["']([^"']+)["']/i) ||                           block.match(/data-title-default=["']([^"']+)["']/i);                // Ekstrak nomor episode di dalam span types episodes        const epMatch = block.match(/class=["'][^"']*types\s+episodes[^"']*["'][^>]*>(?:<[^>]+>)*\s*(\d+)/i) ||                        block.match(/class=["'][^"']*types\s+episodes[^"']*["'][^>]*>([\s\S]*?)<\/div>/i);         if (linkMatch && linkMatch[1]) {            let episodeStr = null;            if (epMatch) {                const epVal = epMatch[1] ? cleanText(epMatch[1]) : '';                if (epVal) episodeStr = `Episode ${epVal.replace(/^Episode\s+/i, '')}`;            }             results.push({                title: titleMatch ? cleanText(titleMatch[1]) : null,                url: linkMatch[1],                poster: imgMatch ? imgMatch[1] : null,                episode: episodeStr,                type: 'Anime'            });        }    }     // Prioritas 2 (Fallback): Jika di halaman pagination bukan article melainkan div.animeseries    if (results.length === 0) {        const cardMatches = [...html.matchAll(/<div\b[^>]*class=["'][^"']*animeseries[^"']*["'][^>]*>([\s\S]*?)<\/div>\s*<\/div>/gi)];        for (const card of cardMatches) {            const block = card[1];            const linkMatch = block.match(/<a\b[^>]*href=["']([^"']+)["']/i);            const imgMatch = block.match(/<img\b[^>]*src=["']([^"']+)["']/i);            const titleMatch = block.match(/data-title-default=["']([^"']+)["']/i) ||                               block.match(/alt=["']([^"']+)["']/i) ||                               block.match(/<h4[^>]*>([\s\S]*?)<\/h4>/i);            const scoreMatch = block.match(/class=["'][^"']*kotakscore[^"']*["'][^>]*>([\s\S]*?)<\/span>/i);             if (linkMatch && linkMatch[1]) {                results.push({                    title: titleMatch ? cleanText(titleMatch[1]) : null,                    url: linkMatch[1],                    poster: imgMatch ? imgMatch[1] : null,                    score: scoreMatch ? cleanText(scoreMatch[1]) : null,                    type: 'Anime'                });            }        }    }     return {        Creator: CREATOR,        Saluran: SALURAN,        status: true,        page,        total: results.length,        results    };} /** * 2. Pencarian anime berdasarkan kata kunci */async function search(query) {    if (!query) throw new Error('Query pencarian diperlukan');    const url = `${BASE_URL}/?s=${encodeURIComponent(query)}`;    const html = await request(url);    const results = [];     const cards = [...html.matchAll(/<a\b([\s\S]*?)href=["'](https:\/\/s13\.nontonanimeid\.boats\/anime\/[^"']+)["']([\s\S]*?)>([\s\S]*?)<\/a>/gi)];     for (const c of cards) {        const itemUrl = c[2];        const inner = c[4];         const titleMatch = inner.match(/<h3\b[^>]*class=["'][^"']*as-anime-title[^"']*["'][^>]*>([\s\S]*?)<\/h3>/i) ||                           c[0].match(/data-title-default=["']([^"']+)["']/i) ||                           c[0].match(/alt=["']([^"']+)["']/i);        const imgMatch = inner.match(/<img\b[^>]*src=["']([^"']+)["']/i);        const ratingMatch = inner.match(/<span\b[^>]*class=["'][^"']*as-rating[^"']*["'][^>]*>([\s\S]*?)<\/span>/i);        const typeMatch = inner.match(/<span\b[^>]*class=["'][^"']*as-type[^"']*["'][^>]*>([\s\S]*?)<\/span>/i);        const seasonMatch = inner.match(/<span\b[^>]*class=["'][^"']*as-season[^"']*["'][^>]*>([\s\S]*?)<\/span>/i);        const synopsisMatch = inner.match(/<p\b[^>]*class=["'][^"']*as-synopsis[^"']*["'][^>]*>([\s\S]*?)<\/p>/i);         const genres = [...inner.matchAll(/<span\b[^>]*class=["'][^"']*as-genre-tag[^"']*["'][^>]*>([\s\S]*?)<\/span>/gi)]            .map(m => cleanText(m[1]));         results.push({            title: titleMatch ? cleanText(titleMatch[1]) : null,            url: itemUrl,            poster: imgMatch ? imgMatch[1] : null,            rating: ratingMatch ? cleanText(ratingMatch[1]).replace(/โญ/g, '').trim() : null,            type: typeMatch ? cleanText(typeMatch[1]).replace(/๐Ÿ“บ/g, '').trim() : null,            season: seasonMatch ? cleanText(seasonMatch[1]).replace(/๐Ÿ“…/g, '').trim() : null,            genres,            synopsis: synopsisMatch ? cleanText(synopsisMatch[1]) : null        });    }     return {        Creator: CREATOR,        Saluran: SALURAN,        status: true,        query,        total: results.length,        results    };} /** * 3. Detail anime & daftar seluruh episode */async function detail(urlOrSlug) {    const url = urlOrSlug.startsWith('http')        ? urlOrSlug        : `${BASE_URL}/anime/${urlOrSlug.replace(/^\/anime\//, '').replace(/\/$/, '')}/`;     const html = await request(url);     const titleMatch = html.match(/<h1[^>]*>([\s\S]*?)<\/h1>/i);    const title = titleMatch ? cleanText(titleMatch[1]).replace(/^Nonton\s+/i, '').replace(/\s+Sub\s+Indo$/i, '') : null;     const posterMatch = html.match(/<meta\b[^>]*property=["']og:image["'][^>]*content=["']([^"']+)["']/i) ||                        html.match(/class=["'][^"']*poster[^"']*["'][^>]*>[\s\S]*?<img\b[^>]*src=["']([^"']+)["']/i);    const poster = posterMatch ? posterMatch[1] : null;     const synopsisMatch = html.match(/class=["'][^"']*entry-content[^"']*["'][^>]*>([\s\S]*?)<\/div>/i) ||                          html.match(/class=["'][^"']*sinopsis[^"']*["'][^>]*>([\s\S]*?)<\/div>/i);    const synopsis = synopsisMatch ? cleanText(synopsisMatch[1]) : null;     const scoreMatch = html.match(/<span\b[^>]*class=["'][^"']*kotakscore[^"']*["'][^>]*>([\s\S]*?)<\/span>/i);    const score = scoreMatch ? cleanText(scoreMatch[1]) : null;     const genres = [...html.matchAll(/<a\b[^>]*href=["']https:\/\/s13\.nontonanimeid\.boats\/genres\/[^"']+["'][^>]*>([\s\S]*?)<\/a>/gi)]        .map(m => cleanText(m[1]));     const allEpMatches = [...html.matchAll(/<a\b[^>]*href=["'](https:\/\/s13\.nontonanimeid\.boats\/[^"']*-episode-\d+\/)["'][^>]*>([\s\S]*?)<\/a>/gi)];    const seen = new Set();    const episodes = [];     for (const ep of allEpMatches) {        const epUrl = ep[1];        if (!seen.has(epUrl)) {            seen.add(epUrl);            const rawText = cleanText(ep[2]);            const numMatch = epUrl.match(/-episode-(\d+)\//);            episodes.push({                episodeNumber: numMatch ? Number(numMatch[1]) : null,                title: rawText || (numMatch ? `Episode ${numMatch[1]}` : 'Episode'),                url: epUrl            });        }    }     episodes.sort((a, b) => (a.episodeNumber || 0) - (b.episodeNumber || 0));     return {        Creator: CREATOR,        Saluran: SALURAN,        status: true,        data: {            title,            url,            poster,            score,            genres: [...new Set(genres)],            synopsis,            totalEpisodes: episodes.length,            episodes        }    };} /** * 4. Informasi episode & daftar server player video */async function episode(urlOrSlug) {    const url = urlOrSlug.startsWith('http')        ? urlOrSlug        : `${BASE_URL}/${urlOrSlug.replace(/^\//, '').replace(/\/$/, '')}/`;     const html = await request(url);     const titleMatch = html.match(/<h1[^>]*>([\s\S]*?)<\/h1>/i);    const title = titleMatch ? cleanText(titleMatch[1]) : null;     let ajaxConfig = null;    const jsonMatch = html.match(/kotakajax\s*=\s*(\{.+?\})/);    if (jsonMatch) {        try { ajaxConfig = JSON.parse(jsonMatch[1]); } catch {}    } else {        const b64Matches = [...html.matchAll(/data:text\/javascript;base64,([A-Za-z0-9+/=]+)/g)];        for (const m of b64Matches) {            const decoded = Buffer.from(m[1], 'base64').toString('utf8');            const jm = decoded.match(/var\s+kotakajax\s*=\s*(\{.+?\})/);            if (jm) {                try { ajaxConfig = JSON.parse(jm[1]); break; } catch {}            }        }    }     const serverTabs = [];    const tabMatches = [...html.matchAll(/<li\b([^>]*kotak_player_option[^>]*)>([\s\S]*?)<\/li>/gi)];    for (const t of tabMatches) {        const attrs = t[1];        const label = cleanText(t[2]);        const post = (attrs.match(/data-post=["']([^"']+)["']/) || [])[1];        const serverName = (attrs.match(/data-type=["']([^"']+)["']/) || [])[1];        const nume = (attrs.match(/data-nume=["']([^"']+)["']/) || [])[1];        if (serverName) {            serverTabs.push({                serverName,                label: label || serverName,                post: post || null,                nume: nume || null            });        }    }     const prevMatch = html.match(/<a\b[^>]*class=["'][^"']*prev[^"']*["'][^>]*href=["']([^"']+)["']/i);    const nextMatch = html.match(/<a\b[^>]*class=["'][^"']*next[^"']*["'][^>]*href=["']([^"']+)["']/i);     return {        Creator: CREATOR,        Saluran: SALURAN,        status: true,        data: {            title,            url,            ajaxEndpoint: ajaxConfig?.url || `${BASE_URL}/wp-admin/admin-ajax.php`,            nonce: ajaxConfig?.nonce || null,            servers: serverTabs,            navigation: {                previous: prevMatch ? prevMatch[1] : null,                next: nextMatch ? nextMatch[1] : null            }        }    };} /** * 5. Jadwal Rilis Anime (/jadwal-rilis/) */async function schedule() {    const html = await request(`${BASE_URL}/jadwal-rilis/`);    const dayKeys = ['senin', 'selasa', 'rabu', 'kamis', 'jumat', 'sabtu', 'minggu'];    const days = [];     for (let i = 0; i < dayKeys.length; i++) {        const key = dayKeys[i];        const tag = `id='${key}'`;        const idx = html.indexOf(tag);        if (idx === -1) continue;         let endIdx = -1;        if (i + 1 < dayKeys.length) {            endIdx = html.indexOf(`id='${dayKeys[i + 1]}'`, idx);        } else {            endIdx = html.indexOf('</section>', idx);            if (endIdx === -1) endIdx = html.indexOf('footer', idx);        }         const block = html.slice(idx, endIdx !== -1 ? endIdx : idx + 40000);        const dayMatch = block.match(/data-day=['"]([^'"]+)['"]/i);        const dateMatch = block.match(/data-date-text=['"]([^'"]+)['"]/i);         const items = [];        const cardMatches = [...block.matchAll(/<a\b([\s\S]*?)href=['"]([^'"]+)['"]([\s\S]*?)>([\s\S]*?)<\/a>/gi)];         for (const c of cardMatches) {            const url = c[2];            const inner = c[4];             const titleMatch = inner.match(/<h3\b[^>]*class=['"][^'"]*as-anime-title[^'"]*['"][^>]*>([\s\S]*?)<\/h3>/i) ||                               c[0].match(/data-title=['"]([^'"]+)['"]/i);            const epMatch = inner.match(/class=['"][^'"]*jr-ep-text[^'"]*['"][^>]*>([\s\S]*?)<\/span>/i);            const typeMatch = inner.match(/class=['"][^'"]*jr-type-badge[^'"]*['"][^>]*>([\s\S]*?)<\/span>/i);            const timeMatch = inner.match(/class=['"][^'"]*jr-time-val[^'"]*['"][^>]*>([\s\S]*?)<\/span>/i);            const scoreMatch = inner.match(/class=['"][^'"]*rating-text[^'"]*['"][^>]*>([\s\S]*?)<\/span>/i);            const posterMatch = inner.match(/<img\b[^>]*src=['"]([^'"]+)['"]/i);             items.push({                title: titleMatch ? cleanText(titleMatch[1]) : null,                url,                episode: epMatch ? cleanText(epMatch[1]) : null,                type: typeMatch ? cleanText(typeMatch[1]) : null,                time: timeMatch ? cleanText(timeMatch[1]) : null,                score: scoreMatch ? cleanText(scoreMatch[1]).replace(/โญ/g, '').trim() : null,                poster: posterMatch ? posterMatch[1] : null            });        }         days.push({            key,            day: dayMatch ? dayMatch[1] : key.toUpperCase(),            date: dateMatch ? dateMatch[1] : null,            count: items.length,            items        });    }     return {        Creator: CREATOR,        Saluran: SALURAN,        status: true,        source: `${BASE_URL}/jadwal-rilis/`,        totalDays: days.length,        days    };} /** * CLI Runner */async function main() {    const args = process.argv.slice(2);    if (!args.length || args.includes('-h') || args.includes('--help')) {        console.log(`====================================================================  NontonAnimeID All-in-One Scraper CLI  Creator : ${CREATOR}  Saluran : ${SALURAN}==================================================================== Penggunaan:  node index.js latest [page]       -> Ambil anime rilis terbaru  node index.js search <judul>      -> Cari anime berdasarkan judul  node index.js detail <slug/url>   -> Detail anime dan daftar episode  node index.js episode <slug/url>  -> Detail episode dan server player  node index.js schedule            -> Jadwal rilis anime harian Contoh:  node index.js latest  node index.js search naruto  node index.js detail diamond-no-ace-act-ii-second-season-part-2  node index.js episode diamond-no-ace-act-ii-second-season-part-2-episode-7  node index.js schedule`);        return;    }     const command = args[0].toLowerCase();     if (command === 'latest' || command === 'terbaru') {        const page = Number(args[1]) || 1;        const res = await latest(page);        console.log(JSON.stringify(res, null, 2));    } else if (command === 'search' || command === 'cari') {        const query = args.slice(1).join(' ').trim();        const res = await search(query);        console.log(JSON.stringify(res, null, 2));    } else if (command === 'detail') {        const target = args[1];        if (!target) throw new Error('Slug atau URL anime diperlukan');        const res = await detail(target);        console.log(JSON.stringify(res, null, 2));    } else if (command === 'episode' || command === 'ep') {        const target = args[1];        if (!target) throw new Error('Slug atau URL episode diperlukan');        const res = await episode(target);        console.log(JSON.stringify(res, null, 2));    } else if (command === 'schedule' || command === 'jadwal') {        const res = await schedule();        console.log(JSON.stringify(res, null, 2));    } else {        const query = args.join(' ').trim();        const res = await search(query);        console.log(JSON.stringify(res, null, 2));    }} const isDirectRun = typeof process !== 'undefined' && process.argv[1] &&    (process.argv[1].endsWith('index.js') || process.argv[1].endsWith('index.mjs') || process.argv[1].includes('s13.nontonanimeid.boats')); if (isDirectRun) {    main().catch(err => {        console.error(JSON.stringify({            Creator: CREATOR,            Saluran: SALURAN,            status: false,            error: err.message        }, null, 2));        process.exit(1);    });} export { latest, search, detail, episode, schedule };export default { latest, search, detail, episode, schedule };