downloaderjavascript5724
Omdown AIO Media Downloader Scraper Engine (18+ Platforms)
Engine scraper All-in-One canggih untuk mengunduh video, audio MP3, foto, dan reels dari 18+ platform populer (TikTok, PineDrama short drama, YouTube, Instagram, Facebook, X/Twitter, Spotify, SoundCloud, Pinterest, Threads, CapCut, Reddit, DeviantArt, Pixiv, MangaDex). Berbasis Next.js Server Action RPC caller dengan automatic Flight chunk decoding & direct streaming links.
Vamz Spectre6 Okt 2026216 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/omdown-media-downloader" -o omdown-media-downloader.js
# 2. Jalankan script
node omdown-media-downloader.js
Dependencies npm yang Dibutuhkan:
npm install axiosPanduan Penggunaan:
// Persyaratan: Node.js v16+
// Instalasi dependensi:
npm install axios
// 1. Eksekusi via CLI:
node omdown-media-downloader.js "https://www.tiktok.com/@stabilllllll1/video/7392574982087249157"
node omdown-media-downloader.js "https://www.instagram.com/reel/C-xyz123/"
node omdown-media-downloader.js "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"
// 2. Integrasi Modular di Script Node.js:
const { downloadMedia, detectPlatform } = require(./omdown-media-downloader);
const url = "https://www.tiktok.com/@stabilllllll1/video/7392574982087249157";
const data = await downloadMedia(url);
if (data.status) {
console.log("Judul:", data.result.title);
console.log("Platform:", data.result.platform);
console.log("Thumbnail:", data.result.thumbnail);
console.log("Daftar format unduhan:");
data.result.formats.forEach((f, idx) => {
console.log(`${idx + 1}. ${f.label} [${f.quality}] -> ${f.downloadUrl}`);
});
}
// 3. Integrasi Bot WhatsApp (Baileys / VamxBotz):
case 'omdown':
case 'aio': {
const url = text.trim();
if (!url) return m.reply('❌ Masukkan URL media (TikTok, IG, YouTube, Spotify, FB, dll):\nContoh: .aio https://vt.tiktok.com/xxxx/');
await m.reply('⏳ Sedang memproses media via Omdown...');
try {
const res = await downloadMedia(url);
if (!res.status) return m.reply('❌ ' + res.message);
const data = res.result;
let caption = `🎬 *${data.title}*\n\n`;
caption += `📱 Platform: ${data.platform}\n`;
if (data.author) caption += `👤 Author: ${data.author}\n`;
if (data.duration) caption += `⏱️ Durasi: ${data.duration}\n`;
caption += `\n⚡ *Pilihan Unduhan:*\n`;
data.formats.forEach((f, i) => {
caption += `${i + 1}. *${f.label}* (${f.quality || f.ext})\n`;
});
const videoFormat = data.formats.find(f => f.kind === 'video' || f.ext === 'mp4');
if (videoFormat?.downloadUrl) {
await conn.sendMessage(m.chat, {
video: { url: videoFormat.downloadUrl },
caption: caption
}, { quoted: m });
} else {
await m.reply(caption);
}
} catch (err) {
m.reply('❌ Terjadi kesalahan: ' + err.message);
}
}omdown-media-downloader.js(216 lines)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/**
* Omdown All-in-One Media Downloader Scraper Engine
* Supports 18+ Platforms: TikTok, YouTube, Instagram, Facebook, X/Twitter,
* Spotify, SoundCloud, Pinterest, Threads, CapCut, PineDrama, Reddit, etc.
*
* Author: Vamz Spectre
* License: MIT
*/
const axios = require('axios');
const BASE_URL = 'https://www.omdown.site';
const ACTION_ID = '70fe8fea45b688241b80ac22216712ce589fb80dc7';
const PLATFORM_PATTERNS = [
{ name: 'TikTok', pattern: /(?:tiktok\.com|vt\.tiktok\.com|vm\.tiktok\.com)/i },
{ name: 'PineDrama', pattern: /(?:shortdrama\.tiktok\.com|pinedrama)/i },
{ name: 'YouTube', pattern: /(?:youtube\.com|youtu\.be)/i },
{ name: 'Instagram', pattern: /(?:instagram\.com|instagr\.am)/i },
{ name: 'X', pattern: /(?:x\.com|twitter\.com)/i },
{ name: 'Facebook', pattern: /(?:facebook\.com|fb\.watch|fb\.com)/i },
{ name: 'Spotify', pattern: /(?:spotify\.com)/i },
{ name: 'SoundCloud', pattern: /(?:soundcloud\.com)/i },
{ name: 'Pinterest', pattern: /(?:pinterest\.com|pin\.it)/i },
{ name: 'Reddit', pattern: /(?:reddit\.com|redd\.it)/i },
{ name: 'CapCut', pattern: /(?:capcut\.com)/i },
{ name: 'Threads', pattern: /(?:threads\.net)/i },
{ name: 'Snapchat', pattern: /(?:snapchat\.com)/i },
{ name: 'Twitch', pattern: /(?:twitch\.tv)/i },
{ name: 'DeviantArt', pattern: /(?:deviantart\.com)/i },
{ name: 'Pixiv', pattern: /(?:pixiv\.net)/i },
{ name: 'MangaDex', pattern: /(?:mangadex\.org)/i }
];
/**
* Deteksi platform dari URL media
* @param {string} url
* @returns {string}
*/
function detectPlatform(url) {
if (!url || typeof url !== 'string') return 'general';
for (const p of PLATFORM_PATTERNS) {
if (p.pattern.test(url)) return p.name.toLowerCase();
}
return 'general';
}
/**
* Scrape & resolve URL media menggunakan Next.js Server Action omdown
* @param {string} mediaUrl
* @param {string} locale
* @returns {Promise<object>}
*/
async function downloadMedia(mediaUrl, locale = 'id') {
try {
if (!mediaUrl || typeof mediaUrl !== 'string') {
return {
status: false,
creator: 'Vamz Spectre',
message: 'Parameter URL media wajib diisi.'
};
}
const trimmedUrl = mediaUrl.trim();
const platform = detectPlatform(trimmedUrl);
const payload = JSON.stringify([trimmedUrl, platform, locale]);
const res = await axios.post(`${BASE_URL}/${locale}`, payload, {
headers: {
'Next-Action': ACTION_ID,
'Content-Type': 'text/plain;charset=UTF-8',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
'Referer': `${BASE_URL}/${locale}`,
'Origin': BASE_URL,
'Accept': 'text/x-component'
},
timeout: 30000
});
const rawText = res.data;
if (!rawText || typeof rawText !== 'string') {
throw new Error('Gagal menerima respon data dari server pengunduh.');
}
// Ekstraksi Flight chunk map (e.g. 2:T470,/api/media/stream...)
const chunkMap = {};
const chunkRegex = /([0-9a-f]+):T([0-9a-f]+),/g;
let cm;
while ((cm = chunkRegex.exec(rawText)) !== null) {
const id = cm[1];
const len = parseInt(cm[2], 16);
const start = cm.index + cm[0].length;
chunkMap['$' + id] = rawText.slice(start, start + len);
}
// Temukan blok JSON respon success
const idx = rawText.indexOf('{"success":');
if (idx === -1) {
throw new Error('Konten tidak ditemukan atau platform belum didukung.');
}
let depth = 0;
let endIdx = -1;
const jsonStr = rawText.slice(idx);
for (let i = 0; i < jsonStr.length; i++) {
if (jsonStr[i] === '{') depth++;
else if (jsonStr[i] === '}') {
depth--;
if (depth === 0) {
endIdx = i + 1;
break;
}
}
}
if (endIdx === -1) {
throw new Error('Gagal mem-parsing payload JSON dari server.');
}
const parsed = JSON.parse(jsonStr.slice(0, endIdx));
if (!parsed.success || !parsed.data) {
throw new Error(parsed.error || 'Gagal mengekstrak informasi media.');
}
const data = parsed.data;
// Normalisasi link download stream menjadi direct URL
const fixUrl = (u) => {
if (!u || typeof u !== 'string') return null;
let target = u;
if (chunkMap[target]) {
target = chunkMap[target];
}
if (target.startsWith('/')) return `${BASE_URL}${target}`;
return target;
};
const formats = (data.formats || []).map(f => {
let dlUrl = f.downloadUrl;
if (dlUrl && chunkMap[dlUrl]) {
dlUrl = chunkMap[dlUrl];
}
return {
id: f.id,
label: f.label,
description: f.description,
kind: f.kind,
quality: f.quality,
ext: f.ext,
downloadUrl: fixUrl(dlUrl)
};
});
return {
status: true,
creator: 'Vamz Spectre',
result: {
platform: data.platform || platform.toUpperCase(),
title: data.title || 'Untitled Media',
author: data.author || null,
duration: data.durationLabel || null,
thumbnail: fixUrl(data.thumbnailUrl),
previewUrl: fixUrl(data.previewUrl),
previewKind: data.previewKind || 'video',
stats: data.stats || null,
music: data.music ? {
title: data.music.title,
author: data.music.author,
playUrl: fixUrl(data.music.playUrl),
duration: data.music.duration
} : null,
formats: formats
}
};
} catch (err) {
return {
status: false,
creator: 'Vamz Spectre',
message: err.response?.data?.error || err.message || 'Gagal memproses media.'
};
}
}
// Module Exports
if (typeof module !== "undefined" && module.exports) {
module.exports = {
downloadMedia,
detectPlatform
};
}
// CLI Execution Support
if (require.main === module) {
(async () => {
const inputUrl = process.argv[2];
if (!inputUrl) {
console.log(`
⚡ [Omdown All-in-One Media Downloader Scraper by Vamz Spectre]
Penggunaan:
node omdown-scraper.js "<URL_MEDIA>"
Contoh:
node omdown-scraper.js "https://www.tiktok.com/@stabilllllll1/video/7392574982087249157"
node omdown-scraper.js "https://www.instagram.com/reel/..."
node omdown-scraper.js "https://open.spotify.com/track/..."
`);
process.exit(0);
}
console.log('⏳ Sedang memproses media...');
const result = await downloadMedia(inputUrl);
console.log(JSON.stringify(result, null, 2));
})();
}