
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@xbibzlibrary/teraboxscraper
Advanced tools
The ultimate, highly-optimized, and complex Terabox Downloader and Scraper library for Node.js, designed for maximum stability and cross-platform terminal compatibility. Built with modern TypeScript.
The Ultimate, Highly-Optimized, and Complex Terabox Downloader and Scraper Library for Node.js.
Library ini dirancang untuk melampaui batas-batas scraper biasa, menawarkan kompleksitas dan keandalan tingkat tinggi:
cheerio) untuk mengekstrak parameter tersembunyi (shareid, uk, sign, timestamp) dari halaman HTML, diikuti dengan panggilan ke Internal Terabox API untuk mendapatkan direct download link yang valid.axios dengan custom HTTP client yang mendukung konfigurasi Proxy dan User-Agent kustom untuk menghindari rate-limiting dan blocking.pino dan pino-pretty untuk sistem logging yang cepat, terstruktur, dan disajikan dengan indah di terminal (tanpa emoji!).ScraperResponse<T> yang secara eksplisit mengelola status success, data, dan error dengan kode kesalahan yang terperinci (E_NETWORK_FAIL, E_PARSING_FAIL, dll.).Pastikan Anda memiliki Node.js (v18+) terinstal.
npm install @xbibzlibrary/teraboxscraper
# atau
yarn add @xbibzlibrary/teraboxscraper
Terabox memerlukan otentikasi untuk mengakses direct download link. Anda wajib menyediakan cookie ndus dari sesi Terabox yang sudah login.
ndus dan salin nilainya."lang=en; ndus=NILAI_NDUS_ANDA;"Berikut adalah contoh penggunaan yang kompleks namun jelas untuk mendapatkan info file dan mengunduhnya.
import { TeraboxScraper, DownloadProgress, Logger, bytesToHuman } from '@xbibzlibrary/teraboxscraper';
import * as path from 'path';
// Inisialisasi Logger untuk output terminal yang menarik
const logger = Logger.getInstance({ level: 'info', prettyPrint: true }).getLogger();
// Konfigurasi Anda
const YOUR_COOKIE = "lang=en; ndus=YOUR_NDUS_COOKIE_HERE;";
const SHARE_LINK = "https://www.terabox.app/s/xxxxxxxxxxxxxxxx";
/**
* Fungsi progress bar kustom yang powerfull untuk terminal
*/
function customProgressBar(progress: DownloadProgress): void {
const totalSizeHuman = bytesToHuman(progress.totalSize);
const downloadedHuman = bytesToHuman(progress.downloaded);
const speedHuman = bytesToHuman(progress.speedBps) + '/s';
const eta = progress.etaSeconds === Infinity ? 'N/A' : `${progress.etaSeconds.toFixed(0)}s`;
const barLength = 40;
const filledLength = Math.round(barLength * progress.percentage / 100);
const emptyLength = barLength - filledLength;
const bar = '█'.repeat(filledLength) + '░'.repeat(emptyLength);
process.stdout.write(
`\r[${bar}] ${progress.percentage.toFixed(2)}% | ${downloadedHuman} / ${totalSizeHuman} | Speed: ${speedHuman} | ETA: ${eta}`
);
}
async function startDownload() {
try {
// 1. Inisialisasi Scraper
const scraper = new TeraboxScraper({
cookie: YOUR_COOKIE,
timeout: 60000,
// proxy: 'http://user:pass@host:port', // Opsi Proxy
});
// 2. Ambil Informasi File (Tahap Scraping & API)
logger.info(`Memproses link: ${SHARE_LINK}`);
const infoResponse = await scraper.getFileInfo(SHARE_LINK);
if (!infoResponse.success || !infoResponse.data) {
logger.error('Gagal mendapatkan info file.', infoResponse.error);
return;
}
const fileInfo = infoResponse.data;
logger.info('Info File Ditemukan:', {
Nama: fileInfo.fileName,
Ukuran: fileInfo.fileSizeHuman,
});
// 3. Unduh File (Tahap Download Stream)
const downloadDir = path.join(process.cwd(), 'downloads');
logger.info(`Memulai pengunduhan ke: ${downloadDir}`);
const downloadResponse = await scraper.downloadFile(
fileInfo,
downloadDir,
customProgressBar // Callback progress bar
);
// Bersihkan baris progress bar
process.stdout.write('\r' + ' '.repeat(100) + '\r');
if (!downloadResponse.success || !downloadResponse.data) {
logger.error('Pengunduhan gagal total.', downloadResponse.error);
return;
}
logger.info('✅ Pengunduhan Selesai!', {
path: downloadResponse.data.filePath,
durasi: `${(downloadResponse.data.durationMs / 1000).toFixed(2)} detik`,
});
} catch (e) {
logger.fatal('Terjadi kesalahan kritis tak terduga.', { error: e });
}
}
startDownload();
| Kategori | Detail |
|---|---|
| Author | Xbibz Official |
| Telegram | t.me/XbibzOfficial |
| TikTok | tiktok.com/@XbibzOfficiall |
| Donasi | ko-fi.com/XbibzOfficial |
Dibuat dengan dedikasi oleh Xbibz Official.
Library ini dirilis di bawah lisensi ISC.
h1 { color: #007ACC; border-bottom: 3px solid #007ACC; padding-bottom: 10px; } h2 { color: #333; border-left: 5px solid #FF9800; padding-left: 10px; margin-top: 30px; } code { background-color: #f0f0f0; padding: 2px 4px; border-radius: 3px; } pre { background-color: #2d2d2d; color: #f8f8f2; padding: 15px; border-radius: 8px; overflow-x: auto; }FAQs
The ultimate, highly-optimized, and complex Terabox Downloader and Scraper library for Node.js, designed for maximum stability and cross-platform terminal compatibility. Built with modern TypeScript.
We found that @xbibzlibrary/teraboxscraper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.