Overview
Docs
Plan
Profile
VamxCodecode.vamxapi.my.id
Koleksi SnippetReq Code❤️DonateDocs APIVamx CDN
VamxAPI
Koleksi Snippet
generaljavascript152

UsersDrive - File Data & Download Extractor

Reverse-engineered file scraper for UsersDrive (usersdrive.com). Parses file ID, video title, precise file size in bytes, upload timestamp, uploader username, and tracker/download links without triggering Cloudflare blocks.

Vamz Spectre13 Okt 2026122 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/usersdrive-downloader" -o usersdrive-downloader.js
# 2. Jalankan script
node usersdrive-downloader.js
usersdrive-downloader.js(122 lines)
Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/**
 * ========================================================
 * Name: UsersDrive File Data & Download Extractor
 * 
 * Cara Download:
 *   curl -sL "https://code.vamxapi.my.id/snippet/raw/usersdrive-downloader" -o usersdrive-downloader.js
 * 
 * Cara Eksekusi:
 *   node usersdrive-downloader.js "https://usersdrive.com/api/download-data/ce5wq9m88s4v.html"
 *   node usersdrive-downloader.js "https://usersdrive.com/ce5wq9m88s4v.html"
 * 
 * Author: Vamz Spectre
 * Source: https://vamxapi.my.id
 * ========================================================
 */

const DEFAULT_HEADERS = {
  "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",
  Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
  "Accept-Language": "en-US,en;q=0.9",
};

/**
 * Extractor Utama UsersDrive
 * Mengurai ID file, nama file, kapasitas, tanggal upload, uploader, dan link download/tracker.
 */
async function extractUsersDrive(targetUrl) {
  const cleanUrl = (targetUrl || "").trim();
  if (!cleanUrl) {
    throw new Error("URL UsersDrive wajib disertakan!");
  }

  const fileIdMatch = cleanUrl.match(/\/([a-zA-Z0-9]+)(?:\.html)?(?:$|[?#])/);
  if (!fileIdMatch || !fileIdMatch[1]) {
    throw new Error("Gagal membaca File ID dari link UsersDrive.");
  }

  const fileId = fileIdMatch[1];
  const standardPageUrl = `https://usersdrive.com/${fileId}.html`;

  const res = await fetch(standardPageUrl, {
    headers: DEFAULT_HEADERS,
  });

  if (!res.ok) {
    throw new Error(`Gagal membuka link UsersDrive: HTTP ${res.status}`);
  }

  const html = await res.text();

  if (html.includes("File Not Found") || html.includes("deleted by the owner")) {
    throw new Error("File di UsersDrive tidak ditemukan atau sudah dihapus oleh uploader.");
  }

  const nameMatch =
    html.match(/<h4>([^<]+)<\/h4>/i) ||
    html.match(/<meta name="description" content="Download File ([^"]+)">/i);
  const sizeMatch = html.match(/<span class="size"[^>]*>([\s\S]*?)<\/span>/i);
  const dateMatch = html.match(/Uploaded on\s*<b>([\s\S]*?)<\/b>\s*([\d:]+)/i);
  const uploaderMatch = html.match(/<a href="https:\/\/usersdrive\.com\/users\/([^"]+)"/i);
  const rawBytesMatch = html.match(/\[URL=https:\/\/usersdrive\.com\/[^\]]+\][^<]*-\s*(\d+)\[\/URL\]/i);

  return {
    status: true,
    platform: "UsersDrive",
    type: "file_download_page",
    file_id: fileId,
    title: nameMatch ? nameMatch[1].trim() : `UsersDrive_${fileId}`,
    size: sizeMatch ? sizeMatch[1].replace(/<[^>]+>/g, "").trim() : null,
    size_bytes: rawBytesMatch ? Number(rawBytesMatch[1]) : null,
    upload_date: dateMatch ? `${dateMatch[1].trim()} ${dateMatch[2].trim()}` : null,
    uploader: uploaderMatch ? uploaderMatch[1].trim() : null,
    page_url: standardPageUrl,
    tracker_torrent_url: `https://usersdrive.com/cgi-bin/tracker.cgi?file_code=${fileId}`,
    source_url: cleanUrl,
  };
}

// Safe Export
if (typeof module !== "undefined" && module.exports) {
  module.exports = {
    extractUsersDrive,
    default: extractUsersDrive,
  };
}

// CLI Runner
const cliArgs = process.argv.slice(2);
const targetInput = cliArgs[0] ? cliArgs[0].trim() : null;

async function runCli() {
  if (!targetInput) {
    console.log(
      JSON.stringify(
        {
          status: false,
          message: "Parameter URL UsersDrive belum disertakan.",
          usage: 'node usersdrive-downloader.js "<url_usersdrive>"',
          examples: [
            'node usersdrive-downloader.js "https://usersdrive.com/api/download-data/ce5wq9m88s4v.html"',
            'node usersdrive-downloader.js "https://usersdrive.com/ce5wq9m88s4v.html"',
          ],
        },
        null,
        2
      )
    );
    process.exit(1);
  }

  const result = await extractUsersDrive(targetInput);
  console.log(JSON.stringify(result, null, 2));
}

if (process.argv[1]) {
  runCli().catch((err) => {
    console.error(JSON.stringify({ status: false, error: err.message || String(err) }, null, 2));
    process.exit(1);
  });
}
VamxCode

Kumpulan script scraper mandiri, downloader, dan automasi bot WhatsApp siap pakai untuk integrasi VamxAPI.

CLI Runner:curl -sL https://code.vamxapi.my.id/snippet/raw/[slug] | node -

Kategori

  • Downloader
  • Scraper
  • Bot WhatsApp
  • AI & ML

Ekosistem

  • VamxAPI Portal
  • Vamx CDN
  • GitHub @Vamzz-spectre

© 2026 Vamx Code. Repositori Script & Scraper Mandiri.

Author: Vamz Spectre•VamxAPI Platform