downloaderjavascript248
MediaDownn AIO Multi-Platform Media Downloader
Scraper dan extractor multi-platform (TikTok, YouTube, Douyin, CapCut, dll) dengan ekstraksi video tanpa watermark dan audio MP3.
Vamz Spectre8 Okt 202669 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/mediadownn-aio-downloader" -o mediadownn-aio-downloader.js
# 2. Jalankan script
node mediadownn-aio-downloader.js
Dependencies npm yang Dibutuhkan:
npm install axiosPanduan Penggunaan:
### Instalasi Dependensi
```bash
npm install axios
```
### Cara Penggunaan (ES6 / CommonJS)
```javascript
const { downloadMedia } = require(./mediadownn-aio-downloader);
async function main() {
const result = await downloadMedia("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
console.log(result);
}
main();
```
### Platform yang Didukung
TikTok, YouTube, Douyin, CapCut, Bilibili, dan berbagai platform media sosial lainnya tanpa watermark.mediadownn-aio-downloader.js(69 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
/**
* MediaDownn Multi-Platform Media Downloader Engine
* Platform: TikTok, YouTube, Douyin, CapCut, Bilibili, and more
* Author: Vamz Spectre / VamxAPI
*/
const axios = require("axios");
/**
* Download media from supported social platforms
* @param {string} url - Target social media URL
* @returns {Promise<Object>} Formatted media metadata and download links
*/
async function downloadMedia(url) {
if (!url || typeof url !== "string" || !url.trim()) {
throw new Error("Target URL is required.");
}
const endpoint = "https://mediadownn.vercel.app/api/download";
const response = await axios.get(endpoint, {
params: { url: url.trim() },
headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
"Accept": "application/json",
"Referer": "https://mediadownn.vercel.app/"
},
timeout: 30000
});
const data = response.data;
if (!data || !data.status || !data.result) {
throw new Error(data?.message || "Failed to extract media from provided URL.");
}
const res = data.result;
return {
status: true,
platform: res.platform || "unknown",
title: res.title || null,
author: res.author || null,
thumbnail: res.thumbnail || null,
duration: res.duration || null,
formatsCount: res.formatsCount || (res.formats ? res.formats.length : 0),
formats: (res.formats || []).map((f) => ({
index: f.index,
type: f.type, // "video" | "audio" | "image"
quality: f.quality,
extension: f.extension,
downloadUrl: f.downloadUrl
}))
};
}
// Example Execution
(async () => {
try {
const sampleUrl = "https://www.tiktok.com/@tiktok/video/7106594312292453675";
console.log("Extracting media:", sampleUrl);
const media = await downloadMedia(sampleUrl);
console.log("Extraction Result:", JSON.stringify(media, null, 2));
} catch (err) {
console.error("Download Error:", err.message);
}
})();
if (typeof module !== "undefined" && module.exports) {
module.exports = { downloadMedia };
}