downloaderjavascript368
Shopee Video Downloader - No Watermark & Clean HD
Scraper & Downloader Shopee Video via Ferramentas da Web API. Mengambil video tanpa watermark (clean HD), thumbnail, dan judul video.
Vamz Spectre13 Okt 2026186 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/shopee-video-downloader" -o shopee-video-downloader.js
# 2. Jalankan script
node shopee-video-downloader.js
shopee-video-downloader.js(186 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
/**
* ========================================================
* Name: Shopee Video Downloader (No Watermark & Clean HD)
*
* Cara Download:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/shopee-video-downloader" -o shopee-video-downloader.js
*
* Cara Eksekusi:
* node shopee-video-downloader.js get "https://shopee.co.id/universal-link/video/..."
* node shopee-video-downloader.js download "https://shopee.co.id/universal-link/video/..."
*
* Author: Vamz Spectre
* Source: https://vamxapi.my.id
* ========================================================
*/
const fs = typeof require !== "undefined" ? require("fs") : null;
const path = typeof require !== "undefined" ? require("path") : null;
const API_BASE = "https://ferramentasdaweb.com.br/baixar-video-shopee/api";
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: "application/json, text/plain, */*",
Referer: "https://ferramentasdaweb.com.br/baixar-video-shopee/",
};
/**
* 1. Ambil Informasi & Link Download Video Shopee (Clean / No-WM & Watermark)
*/
async function getVideoInfo(shopeeUrl) {
const cleanUrl = (shopeeUrl || "").trim();
if (!cleanUrl) {
throw new Error("URL video Shopee wajib disertakan!");
}
const endpoint = `${API_BASE}/info.php?url=${encodeURIComponent(cleanUrl)}`;
const res = await fetch(endpoint, {
method: "GET",
headers: DEFAULT_HEADERS,
});
if (!res.ok) {
throw new Error(`Gagal menghubungi server ekstraktor: HTTP ${res.status}`);
}
const data = await res.json();
if (data.error) {
throw new Error(data.error);
}
return {
status: true,
input_url: cleanUrl,
title: data.title || "Shopee Video",
thumbnail: data.thumbnail || null,
clean_url: data.clean_url || null,
video_url: data.video_url || null,
download_id: data.download_id || null,
};
}
/**
* 2. Download dan simpan video Shopee ke file lokal
*/
async function downloadVideo(shopeeUrl, outputPath = "") {
const info = await getVideoInfo(shopeeUrl);
const targetVideoUrl = info.clean_url || info.video_url;
if (!targetVideoUrl) {
throw new Error("URL video tidak tersedia untuk diunduh.");
}
const fileName =
outputPath ||
`shopee_${info.download_id || Date.now()}_${Date.now().toString().slice(-4)}.mp4`;
const resolvedPath = path.resolve(process.cwd(), fileName);
const res = await fetch(targetVideoUrl, {
headers: {
"User-Agent": DEFAULT_HEADERS["User-Agent"],
Referer: "https://shopee.co.id/",
},
});
if (!res.ok) {
throw new Error(`Gagal mengunduh file media: HTTP ${res.status}`);
}
const arrayBuffer = await res.arrayBuffer();
fs.writeFileSync(resolvedPath, Buffer.from(arrayBuffer));
return {
status: true,
title: info.title,
thumbnail: info.thumbnail,
saved_to: resolvedPath,
file_size_bytes: arrayBuffer.byteLength,
is_clean: Boolean(info.clean_url),
};
}
/**
* Universal Scraper Dispatcher
*/
async function shopeeDownloader(command, ...rest) {
const clean = (command || "").trim();
if (!clean) {
throw new Error("Parameter input (sub-command atau URL video Shopee) wajib disertakan!");
}
const lower = clean.toLowerCase();
if (lower === "get" || lower === "info") {
const targetUrl = rest.join(" ").trim();
if (!targetUrl) throw new Error("Format: node shopee-video-downloader.js get <url_video_shopee>");
return await getVideoInfo(targetUrl);
}
if (lower === "download" || lower === "dl") {
const targetUrl = rest[0];
const outputFile = rest[1] || "";
if (!targetUrl) throw new Error("Format: node shopee-video-downloader.js download <url_video_shopee> [nama_file.mp4]");
return await downloadVideo(targetUrl, outputFile);
}
// Jika langsung memasukkan URL Shopee
if (clean.startsWith("http://") || clean.startsWith("https://")) {
return await getVideoInfo(clean);
}
throw new Error(`Sub-command "${command}" tidak dikenali. Gunakan "get" atau "download".`);
}
// CommonJS safe export
if (typeof module !== "undefined" && module.exports) {
module.exports = {
shopeeDownloader,
getVideoInfo,
downloadVideo,
default: shopeeDownloader,
};
}
/**
* CLI Runner:
* node shopee-video-downloader.js get "https://shopee.co.id/universal-link/video/..."
* node shopee-video-downloader.js download "https://shopee.co.id/universal-link/video/..."
*/
const cliArgs = process.argv.slice(2);
const mainCommand = cliArgs[0] ? cliArgs[0].trim() : null;
async function runCli() {
if (!mainCommand) {
console.log(
JSON.stringify(
{
status: false,
message: "Sub-command belum ditentukan.",
usage: {
get: "node shopee-video-downloader.js get <url_video_shopee>",
download: "node shopee-video-downloader.js download <url_video_shopee> [nama_file.mp4]",
},
examples: [
'node shopee-video-downloader.js get "https://shopee.co.id/universal-link/video/..."',
'node shopee-video-downloader.js download "https://shopee.co.id/universal-link/video/..." video.mp4',
],
},
null,
2
)
);
process.exit(1);
}
const res = await shopeeDownloader(mainCommand, ...cliArgs.slice(1));
console.log(JSON.stringify(res, null, 2));
}
if (process.argv[1]) {
runCli().catch((err) => {
console.error(JSON.stringify({ status: false, error: err.message }, null, 2));
process.exit(1);
});
}