scraperjavascript1328
OtakuDesu Anime Scraper Engine (Search, Ongoing, Detail & Episode Download)
Scraper lengkap anime OtakuDesu (otakudesu.blog). Fitur: List Anime Ongoing, Search Anime by Query, Full Anime Info & Sinopsis, Episode List, dan Extract Download Link Multi-Resolution (360p, 480p, 720p). Dilengkapi CLI interaktif & parameter validator.
Vamz Spectre11 Okt 2026303 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/otakudesu-anime" -o otakudesu-anime.js
# 2. Jalankan script
node otakudesu-anime.js
Dependencies npm yang Dibutuhkan:
npm install axios, cheerioPanduan Penggunaan:
// 1. Download Script via cURL:
curl -sL "https://code.vamxapi.my.id/snippet/raw/otakudesu-anime" -o otakudesu-anime.js
// 2. Install Dependencies:
npm install axios cheerio
// 3. Cara Pakai via Terminal / CLI:
node otakudesu-anime.js "Naruto"
node otakudesu-anime.js --ongoing
node otakudesu-anime.js --detail "solo-leveling"
node otakudesu-anime.js --download "solo-leveling-episode-1-sub-indo"
š” Catatan: Jika dijalankan tanpa parameter (`node otakudesu-anime.js`), script otomatis menampilkan panduan bantuan penggunaan.
// 4. Penggunaan Modular (Node.js / Express / Bot WA Baileys):
const { searchAnime, getAnimeDetail, getEpisodeDownload, getOngoingAnime } = require("./otakudesu-anime");
async function main() {
const hasil = await searchAnime("Solo Leveling");
console.log(hasil);
}
main();otakudesu-anime.js(303 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
/**
* OtakuDesu Scraper Engine (CLI & Module)
* Author: Vamz Spectre / VamxAPI
* Website: https://vamxapi.my.id
* Channel: https://whatsapp.com/channel/0029Vb8n36OGE56uvRAq4y3y
*/
const axios = require('axios');
const cheerio = require('cheerio');
// OtakuDesu Base URL
const BASE_URL = 'https://otakudesu.blog';
const defaultHeaders = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
'Accept-Language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7',
'Referer': BASE_URL + '/',
};
/**
* Helper request HTTP
*/
async function getHtml(url) {
try {
const { data } = await axios.get(url, {
headers: defaultHeaders,
timeout: 15000,
});
return data;
} catch (err) {
if (err.response && err.response.data) return err.response.data;
throw new Error('Gagal mengakses OtakuDesu: ' + err.message);
}
}
/**
* 1. Ambil daftar Anime Ongoing (Terbaru rilis)
*/
async function getOngoingAnime(page = 1) {
const url = page > 1 ? BASE_URL + '/ongoing-anime/page/' + page + '/' : BASE_URL + '/ongoing-anime/';
const html = await getHtml(url);
const $ = cheerio.load(html);
const items = [];
$('.venz ul li').each((_, el) => {
const title = $(el).find('h2.jdlflm').text().trim();
const episode = $(el).find('.epz').text().trim();
const day = $(el).find('.epztipe').text().trim();
const date = $(el).find('.newnime').text().trim();
const link = $(el).find('.thumb a').attr('href') || '';
const poster = $(el).find('.thumb img').attr('src') || '';
const slugMatch = link.match(/\/anime\/([^\/]+)/);
const slug = slugMatch ? slugMatch[1] : link.split('/').filter(Boolean).pop();
if (title && link) {
items.push({
title,
slug,
episode,
release_day: day,
release_date: date,
poster,
url: link,
});
}
});
return {
status: true,
page: Number(page),
total: items.length,
items,
};
}
/**
* 2. Cari Anime berdasarkan Judul / Keyword
* @param {string} query
*/
async function searchAnime(query) {
if (!query || !query.trim()) throw new Error('Query pencarian anime wajib diisi!');
const cleanQ = query.trim();
const url = BASE_URL + '/?s=' + encodeURIComponent(cleanQ) + '&post_type=anime';
const html = await getHtml(url);
const $ = cheerio.load(html);
const items = [];
$('.chlist li, ul.chlist li').each((_, el) => {
const titleEl = $(el).find('h2 a, h2');
const title = titleEl.text().trim();
const link = $(el).find('h2 a').attr('href') || $(el).find('a').attr('href') || '';
const poster = $(el).find('img').attr('src') || '';
const genres = [];
$(el).find('.set a, .genre a').each((_, g) => {
genres.push($(g).text().trim());
});
const status = $(el).find('.set:contains("Status")').text().replace(/Status\s*:\s*/i, '').trim();
const rating = $(el).find('.set:contains("Rating")').text().replace(/Rating\s*:\s*/i, '').trim();
const slugMatch = link.match(/\/anime\/([^\/]+)/);
const slug = slugMatch ? slugMatch[1] : link.split('/').filter(Boolean).pop();
if (title && link) {
items.push({
title,
slug,
status: status || null,
rating: rating || null,
genres: genres.length > 0 ? genres : null,
poster: poster || null,
url: link,
});
}
});
return {
status: true,
query: cleanQ,
total: items.length,
items,
};
}
/**
* 3. Dapatkan Detail Anime Lengkap & Daftar Episode
* @param {string} slugOrUrl
*/
async function getAnimeDetail(slugOrUrl) {
if (!slugOrUrl) throw new Error('Slug anime wajib disertakan!');
const url = slugOrUrl.startsWith('http') ? slugOrUrl : BASE_URL + '/anime/' + slugOrUrl.replace(/^\/+|\/+$/g, '') + '/';
const html = await getHtml(url);
const $ = cheerio.load(html);
const title = $('.infozin .infozingle p:contains("Judul")').text().replace(/Judul\s*:\s*/i, '').trim() || $('h1.jdlflm').text().trim();
const japanese = $('.infozin .infozingle p:contains("Japanese")').text().replace(/Japanese\s*:\s*/i, '').trim();
const score = $('.infozin .infozingle p:contains("Skor")').text().replace(/Skor\s*:\s*/i, '').trim();
const producer = $('.infozin .infozingle p:contains("Produser")').text().replace(/Produser\s*:\s*/i, '').trim();
const type = $('.infozin .infozingle p:contains("Tipe")').text().replace(/Tipe\s*:\s*/i, '').trim();
const status = $('.infozin .infozingle p:contains("Status")').text().replace(/Status\s*:\s*/i, '').trim();
const totalEp = $('.infozin .infozingle p:contains("Total Episode")').text().replace(/Total Episode\s*:\s*/i, '').trim();
const duration = $('.infozin .infozingle p:contains("Durasi")').text().replace(/Durasi\s*:\s*/i, '').trim();
const releaseDate = $('.infozin .infozingle p:contains("Tanggal Rilis")').text().replace(/Tanggal Rilis\s*:\s*/i, '').trim();
const studio = $('.infozin .infozingle p:contains("Studio")').text().replace(/Studio\s*:\s*/i, '').trim();
const poster = $('.fotoanime img').attr('src') || $('.thumb img').attr('src') || '';
const genres = [];
$('.infozin .infozingle p:contains("Genre") a').each((_, g) => {
genres.push($(g).text().trim());
});
const sinopsis = $('.sinopc p').map((_, p) => $(p).text().trim()).get().join('\n') || $('.sinopc').text().trim();
const episodes = [];
$('.episodelist ul li').each((_, el) => {
const epTitle = $(el).find('a').text().trim();
const epLink = $(el).find('a').attr('href') || '';
const epDate = $(el).find('.zeebr').text().trim();
const epSlugMatch = epLink.match(/\/episode\/([^\/]+)/);
const epSlug = epSlugMatch ? epSlugMatch[1] : epLink.split('/').filter(Boolean).pop();
if (epTitle && epLink) {
episodes.push({
title: epTitle,
slug: epSlug,
release_date: epDate || null,
url: epLink,
});
}
});
return {
status: true,
title: title || 'OtakuDesu Anime',
japanese_title: japanese || null,
score: score || null,
type: type || 'TV',
status: status || 'Unknown',
total_episodes: totalEp || null,
duration: duration || null,
release_date: releaseDate || null,
studio: studio || null,
producer: producer || null,
genres,
poster,
sinopsis,
episodes_count: episodes.length,
episodes,
};
}
/**
* 4. Parse Link Download & Stream Episode Anime
* @param {string} slugOrUrl
*/
async function getEpisodeDownload(slugOrUrl) {
if (!slugOrUrl) throw new Error('Slug episode wajib disertakan!');
const url = slugOrUrl.startsWith('http') ? slugOrUrl : BASE_URL + '/episode/' + slugOrUrl.replace(/^\/+|\/+$/g, '') + '/';
const html = await getHtml(url);
const $ = cheerio.load(html);
const title = $('.posttl').text().trim() || $('h1').text().trim();
const streamIframe = $('#embed_holder iframe').attr('src') || $('.responsive-embed-stream iframe').attr('src') || '';
const downloads = [];
$('.download ul li').each((_, li) => {
const qualityText = $(li).find('strong').text().trim();
const size = $(li).find('i').text().trim();
const links = [];
$(li).find('a').each((_, a) => {
links.push({
server: $(a).text().trim(),
url: $(a).attr('href'),
});
});
if (links.length > 0) {
downloads.push({
quality: qualityText,
size: size || null,
links,
});
}
});
return {
status: true,
title,
stream_url: streamIframe || null,
downloads,
};
}
if (typeof module !== "undefined" && module.exports) {
module.exports = {
getOngoingAnime,
searchAnime,
getAnimeDetail,
getEpisodeDownload,
};
}
// Mode CLI Langsung (Interactive & Parameter Checker)
if (require.main === module) {
const args = process.argv.slice(2);
const query = args.join(' ').trim();
if (!query) {
console.log(`
=============================================================
OTAKUDESU ANIME SCRAPER ENGINE (CLI)
=============================================================
ā Error: Parameter perintah atau judul anime tidak boleh kosong!
š CARA PENGGUNAAN LENGKAP:
node otakudesu-anime.js <query_pencarian>
node otakudesu-anime.js --ongoing (Cek rilis anime ongoing terbaru)
node otakudesu-anime.js --detail <slug_anime> (Info detail, sinopsis & episode)
node otakudesu-anime.js --download <slug_ep> (Ambil direct download link)
š CONTOH PENGGUNAAN:
node otakudesu-anime.js "Naruto"
node otakudesu-anime.js "Solo Leveling"
node otakudesu-anime.js --ongoing
node otakudesu-anime.js --detail "sl-season-2-sub-indo"
node otakudesu-anime.js --download "sl-season-2-episode-1-sub-indo"
š” INTEGRASI MODULAR (Node.js / Express / Baileys):
const { searchAnime, getAnimeDetail, getEpisodeDownload, getOngoingAnime } = require("./otakudesu-anime");
const anime = await searchAnime("One Piece");
console.log(anime);
=============================================================
`);
process.exit(1);
}
(async () => {
try {
console.log('ā³ Sedang memproses OtakuDesu...');
if (query === '--ongoing' || query === '-o') {
const res = await getOngoingAnime(1);
console.log(JSON.stringify(res, null, 2));
} else if (query.startsWith('--detail ') || query.startsWith('-d ')) {
const slug = query.replace(/^(--detail|-d)\s+/, '').trim();
const res = await getAnimeDetail(slug);
console.log(JSON.stringify(res, null, 2));
} else if (query.startsWith('--download ') || query.startsWith('-dl ')) {
const slug = query.replace(/^(--download|-dl)\s+/, '').trim();
const res = await getEpisodeDownload(slug);
console.log(JSON.stringify(res, null, 2));
} else {
const res = await searchAnime(query);
console.log(JSON.stringify(res, null, 2));
}
} catch (err) {
console.error('ā Terjadi Kesalahan:', err.message);
}
})();
}