scraperjavascript10825
NanzMusify - Modern YouTube Music Player, Downloader & Synced Lyrics Scraper
Scraper & API engine NanzMusify (YouTube Music & Vidssave AES Engine). Fitur: Search lagu/album/artis, Play direct streaming MP3 256kbps, Direct MP3 download 256kbps & 48kbps, Real-time synced lyrics & terjemahan Indonesia, Home trending charts & suggestions.
Vamz Spectre30 Okt 2026336 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/nanzmusify-updated" -o nanzmusify-updated.js
# 2. Jalankan script
node nanzmusify-updated.js
Panduan Penggunaan:
// ==========================================
// PANDUAN PENGGUNAAN NanzMusify Updated
// ==========================================
// 1. Eksekusi via Terminal (CLI):
// curl -sL "https://code.vamxapi.my.id/snippet/raw/nanzmusify-updated" -o nanzmusify-updated.js
// node nanzmusify-updated.js play "Rewrite The Stars Zendaya"
// node nanzmusify-updated.js download "RbimXGH5zkE"
// node nanzmusify-updated.js search "Rewrite The Stars" songs
// node nanzmusify-updated.js lyrics "RbimXGH5zkE"
// node nanzmusify-updated.js home
// 2. Pasang di Bot WhatsApp (Baileys / VamxBotz):
case "play":
case "lagu": {
if (!text) return m.reply("❌ Masukkan judul lagu yang ingin diputar!");
await m.reply("🔎 Sedang memproses audio & lirik...");
const res = await nanzmusify.play(text);
if (!res.status) return m.reply("❌ Lagu tidak ditemukan.");
const item = res.result;
let cap = `🎵 *${item.title}*\n`;
if (item.artist) cap += `👤 Artis: ${item.artist}\n`;
if (item.album) cap += `💿 Album: ${item.album}\n`;
cap += `⏱ Durasi: ${item.duration} detik\n`;
cap += `⚡ Audio Quality: ${item.quality}\n\n`;
cap += `🔗 Link Download: ${item.streamUrl}`;
await sock.sendMessage(m.chat, {
audio: { url: item.streamUrl },
mimetype: "audio/mp4",
fileName: `${item.title}.mp3`,
contextInfo: {
externalAdReply: {
title: item.title,
body: item.artist || "YouTube Music",
thumbnailUrl: item.thumbnail,
sourceUrl: "https://vamxapi.my.id",
mediaType: 1,
renderLargerThumbnail: true
}
}
}, { quoted: m });
break;
}nanzmusify-updated.js(336 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
/**
* NanzMusify - Modern YouTube Music Player, Downloader & Synced Lyrics Scraper
* Source Target: https://nanzmusify-updated.netlify.app/
* Author: Vamz Spectre (VamxAPI)
*
* Fitur Unggulan:
* 1. Search Music, Albums, Artists, & Playlists
* 2. Play Music (Direct Stream MP3 256kbps + Synced Lyrics + Translations)
* 3. Download MP3 (Direct Download 256kbps & 48kbps via Vidssave AES Engine)
* 4. Real-time Synced Lyrics + Indonesian Line Translations
* 5. Home / Trending Charts & Recommendations
* 6. Search Auto-suggestions
* 7. Album & Artist Discography
*
* CARA PAKAI VIA CLI:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/nanzmusify-updated" -o nanzmusify-updated.js
* node nanzmusify-updated.js play "Rewrite The Stars Zendaya"
* node nanzmusify-updated.js download "RbimXGH5zkE"
* node nanzmusify-updated.js search "Rewrite The Stars" songs
* node nanzmusify-updated.js lyrics "RbimXGH5zkE"
* node nanzmusify-updated.js home
*/
const crypto = require('crypto');
const BASE_URL = 'https://nanzmusify-updated.netlify.app';
const VIDSSAVE_PARSE_URL = 'https://api.vidssave.com/api/contentsite_api/media/parse';
let cachedAuth = '4c9b7d21';
let lastAuthScrape = 0;
/**
* Scrape dynamic auth token from vidssave if expired
*/
async function getVidssaveAuth() {
if (Date.now() - lastAuthScrape < 15 * 60 * 1000 && cachedAuth) {
return cachedAuth;
}
try {
const res = await fetch('https://vidssave.com/', { headers: { 'User-Agent': 'Mozilla/5.0' } });
const html = await res.text();
const chunks = html.match(/src="([^"]*chunk[^"]*\.js)"/g) || [];
for (const c of chunks) {
const src = c.replace(/^src="/, '').replace(/"$/, '');
const chunkUrl = src.startsWith('http') ? src : `https://vidssave.com${src}`;
const chunkRes = await fetch(chunkUrl);
const chunkText = await chunkRes.text();
const match = chunkText.match(/auth:"([a-zA-Z0-9_-]{6,32})"/);
if (match) {
cachedAuth = match[1];
lastAuthScrape = Date.now();
return cachedAuth;
}
}
} catch (_) {}
return cachedAuth || '4c9b7d21';
}
/**
* Decrypt Vidssave AES payload
*/
function decryptVidssavePayload(ciphertext, authKey) {
const keys = [
'4c9b7d2e'.repeat(3) + (authKey || cachedAuth || '4c9b7d21'),
'4c9b7d2e'.repeat(3) + '4c9b7d21',
'4c9b7d2e'.repeat(3) + '4c9b7d2e',
'rz18efAXUbdiaO7k'
];
for (const k of keys) {
try {
const keyBuf = Buffer.from(k, 'utf8');
const ivBuf = Buffer.from(k.slice(0, 16), 'utf8');
const decipher = crypto.createDecipheriv(
k.length === 32 ? 'aes-256-cbc' : 'aes-128-cbc',
keyBuf,
ivBuf
);
decipher.setAutoPadding(false);
let decrypted = decipher.update(ciphertext, 'base64', 'utf8');
decrypted += decipher.final('utf8');
decrypted = decrypted.replace(/\0+$/, '');
const parsed = JSON.parse(decrypted);
if (parsed && (parsed.resources || parsed.title)) {
return parsed;
}
} catch (_) {}
}
return null;
}
/**
* Extract audio resources from YouTube Video ID via Vidssave AES Engine
*/
async function extractAudio(videoId, isRetry = false) {
const auth = await getVidssaveAuth();
const link = `https://www.youtube.com/watch?v=${videoId}`;
const params = new URLSearchParams({
hostname: 'vidssave.com',
auth: auth,
domain: 'api-ak.vidssave.com',
link: link
});
const res = await fetch(VIDSSAVE_PARSE_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0'
},
body: params.toString()
});
if (!res.ok) {
throw new Error(`Vidssave HTTP error: ${res.status}`);
}
const json = await res.json();
if (!json || json.status !== 1 || !json.data) {
if (!isRetry) {
lastAuthScrape = 0;
await getVidssaveAuth();
return extractAudio(videoId, true);
}
throw new Error(`Vidssave parse rejected: ${JSON.stringify(json).slice(0, 150)}`);
}
const decrypted = decryptVidssavePayload(json.data, auth);
if (!decrypted) {
throw new Error('Failed to decrypt audio payload');
}
const resources = decrypted.resources || [];
const audios = resources.filter(r => r.type === 'audio' && r.download_url);
const preferredQualities = ['256KBPS', '128KBPS', 'LOW', '48KBPS'];
audios.sort((a, b) => {
let ia = preferredQualities.indexOf(a.quality);
let ib = preferredQualities.indexOf(b.quality);
if (ia === -1) ia = 99;
if (ib === -1) ib = 99;
return ia - ib;
});
return {
title: decrypted.title,
thumbnail: decrypted.thumbnail || `https://i.ytimg.com/vi_webp/${videoId}/sddefault.webp`,
duration: decrypted.duration,
streamUrl: audios.length > 0 ? audios[0].download_url : null,
quality: audios.length > 0 ? audios[0].quality : null,
downloadLinks: audios.map(a => ({
quality: a.quality,
format: a.format,
size: a.size,
downloadUrl: a.download_url
}))
};
}
const nanzmusify = {
/**
* Search songs, albums, artists, or playlists
*/
async search(query, type = 'songs') {
if (!query) throw new Error('Query parameter is required');
const res = await fetch(`${BASE_URL}/api/search?query=${encodeURIComponent(query)}&type=${type}`);
return await res.json();
},
/**
* Query search auto-suggestions
*/
async suggest(query) {
if (!query) throw new Error('Query parameter is required');
const res = await fetch(`${BASE_URL}/api/suggest?q=${encodeURIComponent(query)}`);
return await res.json();
},
/**
* Get home recommendations, trending, quick picks, and charts
*/
async home() {
const res = await fetch(`${BASE_URL}/api/home`);
return await res.json();
},
/**
* Get synced timestamped lyrics with Indonesian translations
*/
async lyrics(id, title = '', artist = '') {
if (!id) throw new Error('Video ID is required');
const params = new URLSearchParams({ id });
if (title) params.append('title', title);
if (artist) params.append('artist', artist);
const res = await fetch(`${BASE_URL}/api/lyrics?${params.toString()}`);
return await res.json();
},
/**
* Get album tracks and details
*/
async album(albumId) {
if (!albumId) throw new Error('Album ID is required');
const res = await fetch(`${BASE_URL}/api/album?id=${encodeURIComponent(albumId)}`);
return await res.json();
},
/**
* Get artist overview, top songs, and albums
*/
async artist(artistId) {
if (!artistId) throw new Error('Artist ID is required');
const res = await fetch(`${BASE_URL}/api/artist?id=${encodeURIComponent(artistId)}`);
return await res.json();
},
/**
* Download MP3: resolves direct 256kbps/48kbps download URLs for a song
*/
async download(queryOrId) {
let videoId = queryOrId;
let trackInfo = null;
if (!/^[a-zA-Z0-9_-]{11}$/.test(queryOrId)) {
const searchRes = await this.search(queryOrId, 'songs');
const first = searchRes?.result?.songs?.[0];
if (!first || !first.videoId) {
throw new Error(`No songs found matching: "${queryOrId}"`);
}
videoId = first.videoId;
trackInfo = first;
}
const audioData = await extractAudio(videoId);
return {
status: true,
creator: 'Vamz Spectre',
result: {
videoId,
title: trackInfo?.title || audioData.title,
artist: trackInfo?.artist || null,
album: trackInfo?.album || null,
duration: audioData.duration,
thumbnail: trackInfo?.thumbnail || audioData.thumbnail,
streamUrl: audioData.streamUrl,
quality: audioData.quality,
downloads: audioData.downloadLinks
}
};
},
/**
* Play song: fetches direct streaming URL, song info, and synced lyrics in one call
*/
async play(queryOrId) {
let videoId = queryOrId;
let trackInfo = null;
if (!/^[a-zA-Z0-9_-]{11}$/.test(queryOrId)) {
const searchRes = await this.search(queryOrId, 'songs');
const first = searchRes?.result?.songs?.[0];
if (!first || !first.videoId) {
throw new Error(`No songs found matching: "${queryOrId}"`);
}
videoId = first.videoId;
trackInfo = first;
}
const [audioData, lyricsData] = await Promise.all([
extractAudio(videoId),
this.lyrics(videoId, trackInfo?.title || '', trackInfo?.artist || '').catch(() => null)
]);
return {
status: true,
creator: 'Vamz Spectre',
result: {
videoId,
title: trackInfo?.title || audioData.title,
artist: trackInfo?.artist || null,
album: trackInfo?.album || null,
duration: audioData.duration,
thumbnail: trackInfo?.thumbnail || audioData.thumbnail,
streamUrl: audioData.streamUrl,
quality: audioData.quality,
downloads: audioData.downloadLinks,
lyrics: lyricsData?.result?.lyrics || null
}
};
}
};
module.exports = nanzmusify;
// CLI Runner
if (require.main === module) {
(async () => {
const action = process.argv[2] || 'play';
const param = process.argv[3] || 'Rewrite The Stars Zendaya';
try {
let result;
switch (action.toLowerCase()) {
case 'search':
result = await nanzmusify.search(param, process.argv[4] || 'songs');
break;
case 'suggest':
result = await nanzmusify.suggest(param);
break;
case 'home':
result = await nanzmusify.home();
break;
case 'lyrics':
result = await nanzmusify.lyrics(param, process.argv[4] || '', process.argv[5] || '');
break;
case 'album':
result = await nanzmusify.album(param);
break;
case 'artist':
result = await nanzmusify.artist(param);
break;
case 'download':
result = await nanzmusify.download(param);
break;
case 'play':
default:
result = await nanzmusify.play(param);
break;
}
console.log(JSON.stringify(result, null, 2));
} catch (err) {
console.error(JSON.stringify({ status: false, error: err.message }, null, 2));
process.exit(1);
}
})();
}