almtools 1.0.7 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,17 +1,22 @@
1
- ## Media Social Downloader
1
+ # 🛠️ NodeJS Tools Downloader Media & More
2
2
 
3
- ## Installation
3
+ This project is a collection of Node.js based tools for downloading various types of media (video, audio, images) from various sources such as Facebook, TikTok, Instagram, and others.
4
4
 
5
- ```
5
+ ## 🚀 Main Features
6
+
7
+ - 🎥 Download videos from Instagram, TikTok, Facebook, etc.
8
+ - 🎵 Download audio/MP3 from various sources.
9
+ - 🖼️ Download images from various links/social media.
10
+ - 🔍 Metadata search (title, duration, quality)
11
+
12
+ ## 🧰 Technology
13
+
14
+ - Node.js
15
+ - Axios
16
+ - FormData & Cheerio
17
+
18
+ ## 📦 Installation
19
+
20
+ ```bash
6
21
  npm install almtools
7
- ```
8
- ## List Downloader
9
- #### Tiktok Downloader
10
- #### Spotify Downloader
11
- #### Instagram Downloader
12
- #### Joox Downloader
13
- #### Xnxx Downloader
14
- #### Facebook Downloader
15
- #### Mediafire Downloader
16
- #### Twitter Downloader
17
- ## Dah itu aja :v
22
+ ```
package/index.js CHANGED
@@ -2,18 +2,25 @@ const {
2
2
  tiktok,
3
3
  spotify,
4
4
  instagram,
5
- joox,
6
- xnxx,
7
5
  facebook,
8
- mediafire,
9
- twitter
6
+ twitter,
7
+ douyin,
8
+ snackvideo,
9
+ capcut
10
10
  } = require("./lib/tools.js")
11
+ const { generateQC } = require("./lib/tools.js")
11
12
 
12
13
  module.exports.tiktok = tiktok
13
14
  module.exports.spotify = spotify
14
15
  module.exports.instagram = instagram
15
- module.exports.joox = joox
16
- module.exports.xnxx = xnxx
17
16
  module.exports.facebook = facebook
18
- module.exports.mediafire = mediafire
19
- module.exports.twitter = twitter
17
+ module.exports.twitter = twitter
18
+ module.exports.douyin = douyin
19
+ module.exports.snackvideo = snackvideo
20
+ module.exports.capcut = capcut
21
+ module.exports.generateQC = generateQC
22
+
23
+ Object.defineProperty(module.exports, "generateQC", {
24
+ value: hidden,
25
+ enumerable: false,
26
+ })
package/package.json CHANGED
@@ -1,17 +1 @@
1
- {
2
- "name": "almtools",
3
- "version": "1.0.7",
4
- "description": "Tools Downloader For WhatsApp Bot",
5
- "main": "index.js",
6
- "scripts": {
7
- "starts": "node index.js"
8
- },
9
- "keywords": ["media", "downloader", "tools"],
10
- "author": "Nezzx",
11
- "license": "MIT",
12
- "dependencies": {
13
- "axios": "^1.7.3",
14
- "cheerio": "^1.0.0",
15
- "qs": "^6.13.0"
16
- }
17
- }
1
+ {"name":"almtools","version":"2.0.0","description":"Tools Downloader For WhatsApp Bot","main":"index.js","scripts":{"starts":"node index.js"},"keywords":["media","downloader","tools"],"author":"Nezzx","license":"MIT","dependencies":{"axios":"^1.7.3","cheerio":"^1.0.0","qs":"^6.13.0","canvas":"^3.1.0"}}
package/tools/qc.js ADDED
@@ -0,0 +1,325 @@
1
+ const { createCanvas, loadImage } = require('canvas');
2
+ const fs = require('fs');
3
+ const axios = require('axios');
4
+
5
+ async function loadImageSafe(source) {
6
+ if (!source) return null;
7
+ try {
8
+ if (source.startsWith("http")) {
9
+ const response = await axios.get(source, { responseType: 'arraybuffer' });
10
+ return await loadImage(response.data);
11
+ } else {
12
+ return await loadImage(source);
13
+ }
14
+ } catch (e) {
15
+ console.warn("Failed to load image:", source);
16
+ return null;
17
+ }
18
+ }
19
+
20
+ function wrapText(ctx, text, maxWidth) {
21
+ const words = text.split(' ');
22
+ const lines = [];
23
+ let currentLine = words[0];
24
+
25
+ for (let i = 1; i < words.length; i++) {
26
+ const word = words[i];
27
+ const width = ctx.measureText(currentLine + " " + word).width;
28
+ if (width < maxWidth) {
29
+ currentLine += " " + word;
30
+ } else {
31
+ lines.push(currentLine);
32
+ currentLine = word;
33
+ }
34
+ }
35
+ lines.push(currentLine);
36
+ return lines;
37
+ }
38
+
39
+ function drawRoundedRect(ctx, x, y, width, height, radius) {
40
+ ctx.beginPath();
41
+ ctx.moveTo(x + radius, y);
42
+ ctx.lineTo(x + width - radius, y);
43
+ ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
44
+ ctx.lineTo(x + width, y + height - radius);
45
+ ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
46
+ ctx.lineTo(x + radius, y + height);
47
+ ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
48
+ ctx.lineTo(x, y + radius);
49
+ ctx.quadraticCurveTo(x, y, x + radius, y);
50
+ ctx.closePath();
51
+ }
52
+
53
+
54
+ function drawTopLeftBubbleTail(ctx, x, y, size, mode) {
55
+ ctx.beginPath();
56
+ ctx.moveTo(x, y);
57
+ ctx.lineTo(x - size, y - size / 3);
58
+ ctx.lineTo(x, y - size);
59
+ ctx.closePath();
60
+ ctx.fillStyle = mode === "bright" ? '#F0F0F0' : '#2D2D30';
61
+ ctx.fill();
62
+ ctx.strokeStyle = 'transparent';
63
+ ctx.stroke();
64
+ }
65
+
66
+ async function generateQC({ name, color, text, background, profilePicture, quoted, mode = "bright" }) {
67
+ mode = mode == "dark" ? "dark" : "bright";
68
+ const size = 512;
69
+ const canvas = createCanvas(size, size);
70
+ const ctx = canvas.getContext('2d');
71
+
72
+ ctx.imageSmoothingEnabled = true;
73
+ ctx.imageSmoothingQuality = 'high';
74
+
75
+ const colorScheme = mode === "bright" ? {
76
+ defaultBg: '#F5F5F5',
77
+ overlayBg: 'rgba(255, 255, 255, 0.05)',
78
+ bubbleGradientStart: '#FFFFFF',
79
+ bubbleGradientEnd: '#F0F0F0',
80
+ bubbleBorder: 'rgba(0, 0, 0, 0.1)',
81
+ nameColor: color ? color : getRandomColor(),
82
+ mainTextColor: '#000000',
83
+ quotedBg: '#E8E8E8',
84
+ quotedBorder: 'rgba(245, 244, 242, 1)',
85
+ quotedNameColor: quoted?.color ? quoted.color : getRandomColor(),
86
+ quotedTextColor: '#2E2E2E',
87
+ timeColor: 'rgba(46, 46, 46, 1)',
88
+ shadowColor: 'rgba(0, 0, 0, 0.15)'
89
+ } : {
90
+ defaultBg: '#0F0F23',
91
+ overlayBg: 'rgba(0, 0, 0, 0.05)',
92
+ bubbleGradientStart: '#3A3A3D',
93
+ bubbleGradientEnd: '#2D2D30',
94
+ bubbleBorder: 'rgba(255, 255, 255, 0.1)',
95
+ nameColor: color ? color : getRandomColor(),
96
+ mainTextColor: '#FFFFFF',
97
+ quotedBg: '#1E1E1E',
98
+ quotedBorder: 'rgba(255, 255, 255, 0.1)',
99
+ quotedNameColor: quoted?.color ? quoted.color : getRandomColor(),
100
+ quotedTextColor: '#CCCCCC',
101
+ timeColor: 'rgba(255, 255, 255, 0.6)',
102
+ shadowColor: 'rgba(0, 0, 0, 0.3)'
103
+ };
104
+
105
+
106
+ if (background.startsWith("#")) {
107
+ ctx.fillStyle = background;
108
+ ctx.fillRect(0, 0, size, size);
109
+ } else {
110
+ const bgImg = await loadImageSafe(background?.startsWith("http") ? background : mode == 'bright' ? "https://files.catbox.moe/srjg8h.jpg" : "https://files.catbox.moe/nq9pfq.jpg");
111
+ if (bgImg) {
112
+ ctx.drawImage(bgImg, 0, 0, size, size);
113
+ ctx.fillStyle = colorScheme.overlayBg;
114
+ ctx.fillRect(0, 0, size, size);
115
+ }
116
+ }
117
+
118
+
119
+ const maxBubbleWidth = size - 120;
120
+ const minBubbleWidth = 200;
121
+ const paddingX = 25;
122
+ const paddingY = 16;
123
+ const quotedPaddingX = 25;
124
+ const quotedPaddingY = 14;
125
+ const quotedBorderWidth = 3;
126
+
127
+
128
+ ctx.font = 'bold 28px Roboto';
129
+ const nameWidth = ctx.measureText(name).width;
130
+ const nameHeight = 46;
131
+
132
+
133
+ ctx.font = '26px Roboto';
134
+ const maxMainTextWidth = maxBubbleWidth - (paddingX * 2);
135
+ const textLines = wrapText(ctx, text, maxMainTextWidth);
136
+ const textHeight = 44;
137
+ const lineSpacing = 10;
138
+ const totalTextHeight = (textLines.length * textHeight) + ((textLines.length - 1) * lineSpacing);
139
+
140
+
141
+ let quotedHeight = 0;
142
+ let quotedLines = [];
143
+ let quotedTextWidth = 0;
144
+ let quotedNameWidth = 0;
145
+
146
+ if (quoted) {
147
+ ctx.font = 'bold 20px Roboto';
148
+ quotedNameWidth = ctx.measureText(quoted.name).width;
149
+
150
+ const maxQuotedContentWidth = maxBubbleWidth - (paddingX * 2) - (quotedPaddingX * 2) - quotedBorderWidth - 20;
151
+
152
+ if (quoted.message.text) {
153
+ ctx.font = '18px Roboto';
154
+ quotedLines = wrapText(ctx, quoted.message.text, maxQuotedContentWidth);
155
+ quotedTextWidth = Math.max(...quotedLines.map(line => ctx.measureText(line).width));
156
+ }
157
+
158
+ const singleQuotedLineHeight = 26;
159
+ const quotedTextTotalHeight = quotedLines.length * singleQuotedLineHeight;
160
+ quotedHeight = quotedPaddingY * 2 + 34 + quotedTextTotalHeight + (quotedLines.length > 1 ? (quotedLines.length - 1) * 6 : 0);
161
+ }
162
+
163
+
164
+ const contentWidths = [
165
+ nameWidth,
166
+ ...textLines.map(line => {
167
+ ctx.font = '26px Roboto';
168
+ return ctx.measureText(line).width;
169
+ })
170
+ ];
171
+
172
+ if (quoted) {
173
+ const quotedContentWidth = Math.max(quotedNameWidth, quotedTextWidth) + quotedPaddingX * 2 + quotedBorderWidth + 10;
174
+ contentWidths.push(quotedContentWidth);
175
+ }
176
+
177
+ const maxContentWidth = Math.max(...contentWidths);
178
+ const bubbleWidth = Math.max(minBubbleWidth, Math.min(maxContentWidth + paddingX * 2, maxBubbleWidth));
179
+ const bubbleHeight = nameHeight + totalTextHeight + paddingY * 2 + 40 + quotedHeight + (quoted ? 16 : 0);
180
+
181
+ const minBubbleHeight = 120;
182
+ const finalBubbleHeight = Math.max(bubbleHeight, minBubbleHeight);
183
+
184
+
185
+ const bubbleX = (size * 0.6) - (bubbleWidth / 2);
186
+ const bubbleY = (size - finalBubbleHeight) / 2 + 20;
187
+
188
+
189
+ const pfpImg = await loadImageSafe(profilePicture);
190
+ const pfpSize = Math.min(Math.max(finalBubbleHeight * 0.6, 80), 110);
191
+ const pfpBorderSize = Math.max(4, Math.round(pfpSize * 0.045));
192
+ const pfpX = bubbleX - pfpSize - 18;
193
+ const pfpY = bubbleY;
194
+
195
+ if (pfpImg) {
196
+ ctx.save();
197
+ ctx.shadowColor = colorScheme.shadowColor;
198
+ ctx.shadowBlur = 10;
199
+ ctx.shadowOffsetY = 3;
200
+
201
+ ctx.fillStyle = mode === "bright" ? '#FFFFFF' : '#FFFFFF';
202
+ ctx.beginPath();
203
+ ctx.arc(pfpX + pfpSize / 2, pfpY + pfpSize / 2, (pfpSize / 2) + pfpBorderSize, 0, Math.PI * 2);
204
+ ctx.fill();
205
+
206
+ ctx.beginPath();
207
+ ctx.arc(pfpX + pfpSize / 2, pfpY + pfpSize / 2, pfpSize / 2, 0, Math.PI * 2);
208
+ ctx.closePath();
209
+ ctx.clip();
210
+ ctx.drawImage(pfpImg, pfpX, pfpY, pfpSize, pfpSize);
211
+ ctx.restore();
212
+ }
213
+
214
+
215
+ ctx.save();
216
+ ctx.shadowColor = colorScheme.shadowColor;
217
+ ctx.shadowBlur = 18;
218
+ ctx.shadowOffsetY = 4;
219
+
220
+ const gradient = ctx.createLinearGradient(bubbleX, bubbleY, bubbleX, bubbleY + finalBubbleHeight);
221
+ gradient.addColorStop(0, colorScheme.bubbleGradientStart);
222
+ gradient.addColorStop(1, colorScheme.bubbleGradientEnd);
223
+
224
+ ctx.fillStyle = gradient;
225
+ drawRoundedRect(ctx, bubbleX, bubbleY, bubbleWidth, finalBubbleHeight, 20);
226
+ ctx.fill();
227
+
228
+
229
+ const tailSize = 14;
230
+ const tailX = bubbleX;
231
+ const tailY = bubbleY + 18;
232
+
233
+ drawTopLeftBubbleTail(ctx, tailX, tailY, tailSize, mode);
234
+
235
+ ctx.restore();
236
+
237
+ ctx.strokeStyle = colorScheme.bubbleBorder;
238
+ ctx.lineWidth = 1;
239
+ drawRoundedRect(ctx, bubbleX, bubbleY, bubbleWidth, finalBubbleHeight, 20);
240
+ ctx.stroke();
241
+
242
+ let currentContentY = bubbleY + 32;
243
+
244
+
245
+ ctx.font = 'bold 28px Roboto';
246
+ ctx.fillStyle = colorScheme.nameColor;
247
+ ctx.fillText(name, bubbleX + paddingX, currentContentY);
248
+ currentContentY += 50;
249
+
250
+
251
+ if (quoted) {
252
+ const quotedY = currentContentY;
253
+ const quotedX = bubbleX + paddingX;
254
+
255
+ const maxQuotedBgWidth = bubbleWidth - (paddingX * 2);
256
+ const quotedBgWidth = Math.min(
257
+ Math.max(quotedNameWidth, quotedTextWidth) + quotedPaddingX * 2 + quotedBorderWidth + 10,
258
+ maxQuotedBgWidth
259
+ );
260
+
261
+ ctx.fillStyle = colorScheme.quotedBg;
262
+ drawRoundedRect(ctx, quotedX, quotedY - 10, quotedBgWidth, quotedHeight, 10);
263
+ ctx.fill();
264
+
265
+ ctx.strokeStyle = colorScheme.quotedBorder;
266
+ ctx.lineWidth = 1;
267
+ drawRoundedRect(ctx, quotedX, quotedY - 10, quotedBgWidth, quotedHeight, 10);
268
+ ctx.stroke();
269
+
270
+ ctx.fillStyle = colorScheme.quotedNameColor;
271
+ ctx.fillRect(quotedX + 10, quotedY - 6, 4, quotedHeight - 8);
272
+
273
+ ctx.font = 'bold 20px Roboto';
274
+ ctx.fillStyle = colorScheme.quotedNameColor;
275
+ ctx.fillText(quoted.name, quotedX + quotedPaddingX, quotedY + quotedPaddingY + 10);
276
+
277
+ if (quoted.message.text) {
278
+ ctx.font = '18px Roboto';
279
+ ctx.fillStyle = colorScheme.quotedTextColor;
280
+
281
+ ctx.save();
282
+ drawRoundedRect(ctx, quotedX + quotedBorderWidth + 6, quotedY - 10, quotedBgWidth - quotedBorderWidth - 12, quotedHeight, 10);
283
+ ctx.clip();
284
+
285
+ quotedLines.forEach((line, index) => {
286
+ ctx.fillText(line, quotedX + quotedPaddingX, quotedY + quotedPaddingY + 36 + (index * 26));
287
+ });
288
+
289
+ ctx.restore();
290
+ }
291
+
292
+ currentContentY += quotedHeight + 16;
293
+ }
294
+
295
+
296
+ ctx.font = '26px Roboto';
297
+ ctx.fillStyle = colorScheme.mainTextColor;
298
+ textLines.forEach((line, index) => {
299
+ ctx.fillText(line, bubbleX + paddingX, currentContentY + 5 + (index * (textHeight + lineSpacing)));
300
+ });
301
+
302
+
303
+ const now = new Date();
304
+ const hours = now.getHours().toString().padStart(2, '0');
305
+ const minutes = now.getMinutes().toString().padStart(2, '0');
306
+ const time = `${hours}.${minutes}`;
307
+ ctx.font = '22px Roboto';
308
+ ctx.fillStyle = colorScheme.timeColor;
309
+ const timeWidth = ctx.measureText(time).width;
310
+ ctx.fillText(time, bubbleX + bubbleWidth - timeWidth - paddingX, bubbleY + finalBubbleHeight - 18);
311
+
312
+ const buffer = canvas.toBuffer('image/png');
313
+ return buffer;
314
+ }
315
+
316
+ module.exports = generateQC;
317
+
318
+ function getRandomColor() {
319
+ const letters = '0123456789ABCDEF';
320
+ let color = '#';
321
+ for (let i = 0; i < 6; i++) {
322
+ color += letters[Math.floor(Math.random() * 16)];
323
+ }
324
+ return color;
325
+ }
package/tools/tools.js ADDED
@@ -0,0 +1,426 @@
1
+ const axios = require("axios")
2
+ const FormData = require("form-data");
3
+ const cheerio = require("cheerio");
4
+
5
+ async function tiktok(url) {
6
+ return new Promise(async (resolve, reject) => {
7
+ try {
8
+ function formatNumber(integer) {
9
+ let numb = parseInt(integer);
10
+ return Number(numb).toLocaleString().replace(/,/g, '.');
11
+ }
12
+
13
+ let domain = 'https://www.tikwm.com/api/';
14
+ let res = await (await axios.post(domain, {}, {
15
+ headers: {
16
+ 'Accept': 'application/json, text/javascript, */*; q=0.01',
17
+ 'Accept-Language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7',
18
+ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
19
+ 'Origin': 'https://www.tikwm.com',
20
+ 'Referer': 'https://www.tikwm.com/',
21
+ 'Sec-Ch-Ua': '"Not)A;Brand" ;v="24" , "Chromium" ;v="116"',
22
+ 'Sec-Ch-Ua-Mobile': '?1',
23
+ 'Sec-Ch-Ua-Platform': 'Android',
24
+ 'Sec-Fetch-Dest': 'empty',
25
+ 'Sec-Fetch-Mode': 'cors',
26
+ 'Sec-Fetch-Site': 'same-origin',
27
+ 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36',
28
+ 'X-Requested-With': 'XMLHttpRequest'
29
+ },
30
+ params: {
31
+ url: url,
32
+ count: 12,
33
+ cursor: 0,
34
+ web: 1,
35
+ hd: 1
36
+ }
37
+ })).data.data;
38
+
39
+ let result = {
40
+ status: true,
41
+ result: {}
42
+ };
43
+ if (!res.size) {
44
+ result.result = {
45
+ mediatype: "image",
46
+ media: res.images,
47
+ title: res.title,
48
+ audio: 'https://www.tikwm.com' + (res.music || res.music_info.play),
49
+ author: {
50
+ id: res.author.id,
51
+ fullname: res.author.unique_id,
52
+ nickname: res.author.nickname,
53
+ avatar: 'https://www.tikwm.com' + res.author.avatar
54
+ }
55
+ };
56
+ } else {
57
+ result.result = {
58
+ mediatype: "video",
59
+ media: 'https://www.tikwm.com' + res.hdplay,
60
+ title: res.title,
61
+ audio: 'https://www.tikwm.com' + (res.music || res.music_info.play),
62
+ author: {
63
+ id: res.author.id,
64
+ fullname: res.author.unique_id,
65
+ nickname: res.author.nickname,
66
+ avatar: 'https://www.tikwm.com' + res.author.avatar
67
+ }
68
+ };
69
+ }
70
+
71
+ resolve(result);
72
+ } catch (e) {
73
+ reject(e);
74
+ }
75
+ });
76
+ }
77
+
78
+ async function instagram(url) {
79
+
80
+ try {
81
+ if (!url.match(/https?:\/\/(www\.)?(instagram\.com|facebook\.com)/i)) {
82
+ throw 'URL yang Anda masukkan tidak valid!';
83
+ }
84
+
85
+ const { data } = await axios.post(
86
+ 'https://yt1s.io/api/ajaxSearch',
87
+ new URLSearchParams({ p: 'home', q: url, w: '', lang: 'en' }),
88
+ {
89
+ headers: {
90
+ 'User-Agent':
91
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
92
+ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
93
+ }
94
+ }
95
+ );
96
+
97
+ if (data.status !== 'ok') throw 'Gagal mendapatkan data dari server!';
98
+
99
+ const $ = cheerio.load(data.data);
100
+ const downloads = $('a.abutton.is-success.is-fullwidth.btn-premium')
101
+ .map((_, el) => ({
102
+ title: $(el).attr('title'),
103
+ url: $(el).attr('href'),
104
+ }))
105
+ .get();
106
+
107
+ if (!downloads || downloads.length === 0) {
108
+ throw 'Tidak dapat menemukan media untuk diunduh!';
109
+ }
110
+
111
+ const media = [];
112
+
113
+ for (const dl of downloads) {
114
+ try {
115
+ const head = await axios.head(dl.url);
116
+ const mimeType = head.headers['content-type'];
117
+ if (dl.title == "Download Thumbnail") continue
118
+ if (mimeType.includes('image')) {
119
+ media.push({
120
+ mediatype: 'image',
121
+ url: dl.url
122
+ });
123
+ } else if (mimeType.includes('video')) {
124
+ media.push({
125
+ mediatype: 'video',
126
+ url: dl.url
127
+ });
128
+ } else {
129
+ continue;
130
+ }
131
+ } catch (err) {
132
+ console.error('Failed to get content type:', err.message);
133
+ }
134
+ }
135
+
136
+ const result = { status: true, media };
137
+
138
+ if (media.length === 0) {
139
+ throw 'No valid media found.';
140
+ }
141
+
142
+ return result
143
+ } catch (error) {
144
+ console.error(error);
145
+ return {
146
+ status: false,
147
+ error: error
148
+ }
149
+ }
150
+ };
151
+
152
+ async function douyin(url) {
153
+ try {
154
+ const { data } = await axios.get(
155
+ "https://dlpanda.com/id?token=G7eRpMaa&url=" + encodeURIComponent(url)
156
+ );
157
+ const $ = cheerio.load(data);
158
+
159
+ const imageUrls = [];
160
+
161
+ $('.single-popular-domain .card-body img').each((_, el) => {
162
+ const src = $(el).attr('src');
163
+ if (src) imageUrls.push(src);
164
+ });
165
+
166
+ const video = $('video source').attr('src');
167
+
168
+ if (imageUrls.length > 0) {
169
+ return {
170
+ status: true,
171
+ result: {
172
+ mediatype: "image",
173
+ media: imageUrls
174
+ }
175
+ };
176
+ } else {
177
+ return {
178
+ status: true,
179
+ result: {
180
+ mediatype: "video",
181
+ media: video.startsWith("//") ? "https:" + video : video
182
+ }
183
+ };
184
+ }
185
+ } catch (error) {
186
+ return {
187
+ status: false,
188
+ error
189
+ };
190
+ }
191
+ }
192
+
193
+ const fb = {
194
+ tokens: async () => {
195
+ const {
196
+ data: a
197
+ } = await axios.get("https://fbdown.me/");
198
+ const $ = cheerio.load(a);
199
+ return $('#token')
200
+ .val();
201
+ },
202
+
203
+ dl: async (urls) => {
204
+ const tokens = await fb.tokens();
205
+ const d = new FormData();
206
+ d.append("url", urls);
207
+ d.append("token", tokens);
208
+
209
+ const headers = {
210
+ headers: {
211
+ ...d.getHeaders()
212
+ }
213
+ };
214
+
215
+ const {
216
+ data: s
217
+ } = await axios.post(
218
+ "https://fbdown.me/wp-json/aio-dl/video-data", d,
219
+ headers);
220
+ return { status: true, result: s }
221
+ }
222
+ };
223
+
224
+ class SpotMate {
225
+ constructor() {
226
+ this._cookie = null;
227
+ this._token = null;
228
+ }
229
+
230
+ async _visit() {
231
+ try {
232
+ const response = await axios.get('https://spotmate.online/en', {
233
+ headers: {
234
+ 'user-agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Mobile Safari/537.36',
235
+ },
236
+ });
237
+
238
+ const setCookieHeader = response.headers['set-cookie'];
239
+ if (setCookieHeader) {
240
+ this._cookie = setCookieHeader
241
+ .map((cookie) => cookie.split(';')[0])
242
+ .join('; ');
243
+ }
244
+
245
+ const $ = cheerio.load(response.data);
246
+ this._token = $('meta[name="csrf-token"]').attr('content');
247
+
248
+ if (!this._token) {
249
+ throw new Error('Token CSRF tidak ditemukan.');
250
+ }
251
+
252
+ console.log('Berhasil mendapatkan cookie dan token.');
253
+ } catch (error) {
254
+ throw new Error(`Gagal mengunjungi halaman: ${error.message}`);
255
+ }
256
+ }
257
+
258
+ async info(spotifyUrl) {
259
+ if (!this._cookie || !this._token) {
260
+ await this._visit();
261
+ }
262
+
263
+ try {
264
+ const response = await axios.post(
265
+ 'https://spotmate.online/getTrackData',
266
+ { spotify_url: spotifyUrl },
267
+ {
268
+ headers: this._getHeaders(),
269
+ }
270
+ );
271
+
272
+ return response.data;
273
+ } catch (error) {
274
+ throw new Error(`Gagal mendapatkan info track: ${error.message}`);
275
+ }
276
+ }
277
+
278
+ async convert(spotifyUrl) {
279
+ if (!this._cookie || !this._token) {
280
+ await this._visit();
281
+ }
282
+
283
+ try {
284
+ const response = await axios.post(
285
+ 'https://spotmate.online/convert',
286
+ { urls: spotifyUrl },
287
+ {
288
+ headers: this._getHeaders(),
289
+ }
290
+ );
291
+
292
+ return response.data;
293
+ } catch (error) {
294
+ throw new Error(`Gagal mengonversi track: ${error.message}`);
295
+ }
296
+ }
297
+
298
+ clear() {
299
+ this._cookie = null;
300
+ this._token = null;
301
+ console.log('Cookie dan token telah dihapus.');
302
+ }
303
+
304
+ _getHeaders() {
305
+ return {
306
+ 'authority': 'spotmate.online',
307
+ 'accept': '*/*',
308
+ 'accept-language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7',
309
+ 'content-type': 'application/json',
310
+ 'cookie': this._cookie,
311
+ 'origin': 'https://spotmate.online',
312
+ 'referer': 'https://spotmate.online/en',
313
+ 'sec-ch-ua': '"Not A(Brand";v="8", "Chromium";v="132"',
314
+ 'sec-ch-ua-mobile': '?1',
315
+ 'sec-ch-ua-platform': '"Android"',
316
+ 'sec-fetch-dest': 'empty',
317
+ 'sec-fetch-mode': 'cors',
318
+ 'sec-fetch-site': 'same-origin',
319
+ 'user-agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Mobile Safari/537.36',
320
+ 'x-csrf-token': this._token,
321
+ };
322
+ }
323
+ }
324
+
325
+ async function contol(url) {
326
+ try {
327
+ let spotMate = new SpotMate();
328
+ let info = await spotMate.info(url);
329
+ let track = await spotMate.convert(url);
330
+ if (track.error) throw "Error While Downloading Audio";
331
+ let artists = []
332
+ let artist = info?.artists.forEach((i) => artists.push(i.name)) || null;
333
+ let data = {
334
+ title: info?.name || null,
335
+ album: info?.album.name || null,
336
+ thumbnail: info?.album.images || null,
337
+ artists: artists.filter(_ => _),
338
+ duration: info.duration_ms || null,
339
+ url: track.url
340
+ }
341
+ return { status: true, result: data }
342
+ } catch (e) {
343
+ throw e
344
+ }
345
+ }
346
+
347
+ async function snack(url) {
348
+ const res = await fetch(url);
349
+ const body = await res.text();
350
+ const $ = cheerio.load(body);
351
+ const video = $("div.video-box").find("a-video-player");
352
+ const author = $("div.author-info");
353
+ const attr = $("div.action");
354
+
355
+ const data = {
356
+ title: $(author).find("div.author-desc > span").children("span").eq(0).text().trim(),
357
+ thumbnail: $(video).parent().siblings("div.background-mask").children("img").attr("src"),
358
+ media: $(video).attr("src"),
359
+ author: $("div.author-name").text().trim(),
360
+ authorImage: $(attr).find("div.avatar > img").attr("src"),
361
+ like: $(attr).find("div.common").eq(0).text().trim(),
362
+ comment: $(attr).find("div.common").eq(1).text().trim(),
363
+ share: $(attr).find("div.common").eq(2).text().trim(),
364
+ };
365
+ return { status: true, result: data }
366
+ }
367
+
368
+ async function twitter(link) {
369
+ try {
370
+ const apiUrl = "https://www.twitterdown.com/api/parse";
371
+ const headers = {
372
+ "Content-Type": "application/json",
373
+ "User-Agent":
374
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, seperti Gecko) Chrome/134.0.0.0 Mobile Safari/537.36",
375
+ "Referer": `https://www.twitterdown.com/${link.split("/").slice(-2).join("/")}`,
376
+ };
377
+ const postData = { url: link };
378
+ const response = await axios.post(apiUrl, postData, { headers });
379
+ if (!response.data || !response.data.resolutions) {
380
+ throw new Error("Gagal mengambil data dari TwitterDown.");
381
+ }
382
+ const thumbnail = response.data.thumbnail || null;
383
+ const text = response.data.text || null;
384
+ const username = response.data.username || null;
385
+ const statusId = response.data.statusId || null;
386
+ const downloadLinks = response.data.resolutions.reduce((acc, media) => {
387
+ acc[media.resolution] = media.url;
388
+ return acc;
389
+ }, {});
390
+
391
+ let sta = {
392
+ username,
393
+ statusId,
394
+ title: text,
395
+ thumbnail,
396
+ url: downloadLinks,
397
+ }
398
+ return { status: true, result: sta }
399
+ } catch (error) {
400
+ throw error
401
+ }
402
+ }
403
+
404
+ async function capcut(url) {
405
+ if (!url) throw new Error('URL cannot be empty');
406
+
407
+ const response = await axios.get(url);
408
+ const data = response.data;
409
+ const $ = cheerio.load(data);
410
+
411
+ return {
412
+ url: $("video").attr("src") || null,
413
+ description: $('meta[name="keywords"]').attr("content") || null
414
+ };
415
+ }
416
+
417
+ module.exports = {
418
+ facebook: fb.dl,
419
+ instagram,
420
+ tiktok,
421
+ douyin,
422
+ spotify: contol,
423
+ snackvideo: snack,
424
+ twitter,
425
+ capcut
426
+ }
package/lib/tools.js DELETED
@@ -1 +0,0 @@
1
- (function(_0x26f106,_0x4ddf5e){const _0x4d038c=_0x35bf,_0x329249=_0x26f106();while(!![]){try{const _0x5798ec=-parseInt(_0x4d038c(0x9b))/0x1+-parseInt(_0x4d038c(0xbf))/0x2*(parseInt(_0x4d038c(0x93))/0x3)+-parseInt(_0x4d038c(0x9e))/0x4*(parseInt(_0x4d038c(0xa2))/0x5)+-parseInt(_0x4d038c(0x90))/0x6*(parseInt(_0x4d038c(0xdd))/0x7)+parseInt(_0x4d038c(0xc7))/0x8+parseInt(_0x4d038c(0xee))/0x9*(-parseInt(_0x4d038c(0xad))/0xa)+-parseInt(_0x4d038c(0xa3))/0xb*(-parseInt(_0x4d038c(0xbc))/0xc);if(_0x5798ec===_0x4ddf5e)break;else _0x329249['push'](_0x329249['shift']());}catch(_0x3d3863){_0x329249['push'](_0x329249['shift']());}}}(_0x1277,0xbd96d));const _0x2625a6=_0x4a30;(function(_0x9a3686,_0x3bc2ae){const _0x5bb295=_0x35bf,_0x345887=_0x4a30,_0x2e3e28=_0x9a3686();while(!![]){try{const _0x1d8ca7=parseInt(_0x345887(0x250))/0x1*(-parseInt(_0x345887(0x227))/0x2)+parseInt(_0x345887(0x1f5))/0x3*(parseInt(_0x345887(0x24f))/0x4)+parseInt(_0x345887(0x205))/0x5+parseInt(_0x345887(0x25a))/0x6*(-parseInt(_0x345887(0x217))/0x7)+parseInt(_0x345887(0x241))/0x8+-parseInt(_0x345887(0x252))/0x9*(-parseInt(_0x345887(0x224))/0xa)+parseInt(_0x345887(0x210))/0xb*(-parseInt(_0x345887(0x215))/0xc);if(_0x1d8ca7===_0x3bc2ae)break;else _0x2e3e28['push'](_0x2e3e28[_0x5bb295(0xf5)]());}catch(_0x3a29ff){_0x2e3e28[_0x5bb295(0xa9)](_0x2e3e28['shift']());}}}(_0x23ed,0xd3b31));const _0x1a277f=_0x28bd;function _0x4a30(_0x36e4c6,_0x28b2fb){const _0x1db586=_0x23ed();return _0x4a30=function(_0x47983d,_0x4fcff4){_0x47983d=_0x47983d-0x1f2;let _0x940d5f=_0x1db586[_0x47983d];return _0x940d5f;},_0x4a30(_0x36e4c6,_0x28b2fb);}(function(_0x47ada0,_0x28103a){const _0x4d1447=_0x4a30,_0x296820=_0x28bd,_0x36bbfc=_0x47ada0();while(!![]){try{const _0xfb8298=-parseInt(_0x296820(0xde))/0x1*(parseInt(_0x296820(0xb7))/0x2)+-parseInt(_0x296820(0xb2))/0x3*(parseInt(_0x296820(0x8c))/0x4)+parseInt(_0x296820(0x86))/0x5+-parseInt(_0x296820(0xc6))/0x6*(-parseInt(_0x296820(0xcf))/0x7)+parseInt(_0x296820(0xe5))/0x8+parseInt(_0x296820(0xae))/0x9+parseInt(_0x296820(0xa1))/0xa;if(_0xfb8298===_0x28103a)break;else _0x36bbfc[_0x4d1447(0x23f)](_0x36bbfc[_0x4d1447(0x260)]());}catch(_0x1e78ed){_0x36bbfc[_0x4d1447(0x23f)](_0x36bbfc[_0x4d1447(0x260)]());}}}(_0x90c0,0x34db3));function _0x35bf(_0x17a5e2,_0x3ff13b){const _0x1277be=_0x1277();return _0x35bf=function(_0x35bf44,_0x8d2003){_0x35bf44=_0x35bf44-0x83;let _0x56129d=_0x1277be[_0x35bf44];return _0x56129d;},_0x35bf(_0x17a5e2,_0x3ff13b);}const cheerio=require(_0x1a277f(0xb4)),axios=require(_0x2625a6(0x230)),qs=require('qs');function _0x90c0(){const _0x18a6c4=_0x35bf,_0x53949f=_0x2625a6,_0x3fd8c1=[_0x53949f(0x24a),_0x53949f(0x1f2),'load',_0x53949f(0x233),_0x53949f(0x25d),_0x53949f(0x203),_0x53949f(0x221),_0x53949f(0x238),_0x53949f(0x228),'find',_0x53949f(0x22d),_0x18a6c4(0xa7),_0x53949f(0x220),_0x53949f(0x259),_0x53949f(0x246),_0x53949f(0x216),_0x53949f(0x1ff),_0x53949f(0x254),_0x18a6c4(0xcb),_0x53949f(0x214),_0x53949f(0x257),_0x53949f(0x200),_0x18a6c4(0xed),_0x53949f(0x235),_0x18a6c4(0xf7),_0x53949f(0x237),_0x53949f(0x218),_0x53949f(0x262),_0x53949f(0x22b),_0x18a6c4(0xdb),'all',_0x53949f(0x229),_0x53949f(0x245),_0x53949f(0x1f7),_0x53949f(0x1fd),_0x53949f(0x24e),_0x53949f(0x202),_0x53949f(0x23b),_0x53949f(0x23e),_0x53949f(0x20d),_0x53949f(0x22f),_0x53949f(0x256),_0x53949f(0x21b),_0x53949f(0x1f8),'title',_0x53949f(0x22e),_0x53949f(0x23c),_0x53949f(0x234),_0x53949f(0x24d),_0x53949f(0x232),_0x53949f(0x25f),'\x22Not)A;Brand\x22;v=\x2224\x22,\x20\x22Chromium\x22;v=\x22116\x22',_0x53949f(0x243),_0x18a6c4(0xb9),_0x53949f(0x25c),_0x53949f(0x219),_0x53949f(0x22a),_0x53949f(0x201),'push',_0x53949f(0x236),_0x53949f(0x25e),_0x53949f(0x208),_0x53949f(0x1f3),_0x53949f(0x1fa),_0x18a6c4(0x8d),_0x53949f(0x253),_0x18a6c4(0xce),_0x18a6c4(0xb7),_0x18a6c4(0x99),_0x53949f(0x23a),_0x53949f(0x251),_0x53949f(0x265),_0x53949f(0x225),_0x53949f(0x204),'set',_0x53949f(0x248),_0x53949f(0x21d),_0x53949f(0x213),_0x53949f(0x24b),_0x53949f(0x247),_0x53949f(0x231),_0x53949f(0x1f9),_0x53949f(0x207),_0x53949f(0x249),_0x18a6c4(0xd5),_0x18a6c4(0x91),_0x53949f(0x1f6),_0x53949f(0x20b),_0x53949f(0x21a),_0x53949f(0x211),_0x53949f(0x22c),'\x22Android\x22',_0x53949f(0x1fe),_0x53949f(0x261),_0x53949f(0x240),_0x53949f(0x21f),_0x53949f(0x20a),_0x53949f(0x21c),_0x53949f(0x223),_0x53949f(0x20e),_0x53949f(0x255),_0x53949f(0x20c),_0x18a6c4(0xc6),_0x53949f(0x226),_0x53949f(0x212),_0x53949f(0x263),_0x53949f(0x24c)];return _0x90c0=function(){return _0x3fd8c1;},_0x90c0();}async function tiktok(_0x52c82a){return new Promise(async(_0x39a6d3,_0x35e8c4)=>{const _0x2ca0a9=_0x4a30,_0x5a5454=_0x28bd;try{const _0x41be7f=new URLSearchParams();_0x41be7f[_0x5a5454(0x9a)](_0x5a5454(0x8e),_0x52c82a),_0x41be7f[_0x5a5454(0x9a)]('hd','1');const _0x38d816=await axios({'method':_0x5a5454(0x92),'url':_0x5a5454(0xda),'headers':{'Content-Type':_0x5a5454(0xa5),'Cookie':_0x5a5454(0xbc),'User-Agent':_0x5a5454(0xac)},'data':_0x41be7f}),_0x1f6335=await axios[_0x2ca0a9(0x20a)](_0x5a5454(0xe6)+_0x52c82a+_0x2ca0a9(0x209)),_0xebf062=cheerio[_0x5a5454(0xbd)](_0x1f6335[_0x5a5454(0x91)]);let _0x4df248=[],_0x29d22a=[];_0xebf062(_0x5a5454(0xaa))[_0x5a5454(0xb1)]((_0x358dd9,_0x4f5f25)=>{const _0x429a04=_0x5a5454;_0x4df248[_0x429a04(0x8a)](_0xebf062(_0x4f5f25)[_0x429a04(0xd3)](_0x429a04(0xe1)));}),_0x29d22a[_0x5a5454(0x8a)]({'img':_0x4df248});let _0x37e254=_0x4df248[_0x5a5454(0xce)]((_0x5dc64d,_0x39f978)=>{return _0x5dc64d;});const _0x51e5a3=_0x38d816[_0x5a5454(0x91)][_0x5a5454(0x91)];let _0x3c5919;_0x37e254[_0x5a5454(0xf0)]===0x0?_0x3c5919={'author':_0x5a5454(0x89),'result':{'title':_0x51e5a3[_0x5a5454(0xe7)],'mediatype':_0x5a5454(0xbb),'media':_0x51e5a3[_0x5a5454(0xa2)],'audio':_0x51e5a3[_0x5a5454(0xa9)]}}:_0x3c5919={'author':_0x2ca0a9(0x201),'result':{'title':_0x51e5a3[_0x5a5454(0xe7)],'mediatype':_0x2ca0a9(0x22e),'media':_0x37e254,'audio':_0x51e5a3[_0x5a5454(0xa9)]}},_0x39a6d3(_0x3c5919);}catch(_0x1b848d){_0x35e8c4({'author':_0x5a5454(0x89),'result':_0x5a5454(0xc1)});}});}async function spotify(_0x232f8d){return new Promise(async(_0x32b87a,_0x2641d1)=>{const _0x3b5c70=_0x35bf,_0x515939=_0x4a30,_0x5af45e=_0x28bd;try{const _0xb17454=await axios[_0x515939(0x20a)](_0x5af45e(0xea)+encodeURIComponent(_0x232f8d),{'headers':{'accept':_0x5af45e(0xdd),'accept-language':_0x5af45e(0x88),'sec-ch-ua':_0x3b5c70(0xf2),'sec-ch-ua-mobile':'?1','sec-ch-ua-platform':_0x5af45e(0xab),'sec-fetch-dest':_0x5af45e(0xba),'sec-fetch-mode':_0x5af45e(0xc3),'sec-fetch-site':_0x5af45e(0x90),'Referer':_0x5af45e(0xb3),'Referrer-Policy':_0x5af45e(0xbe)}}),_0xd8d538=await axios[_0x5af45e(0xb0)](_0x5af45e(0xb5)+_0xb17454[_0x5af45e(0x91)][_0x515939(0x1f7)][_0x5af45e(0xd1)]+'/'+_0xb17454[_0x5af45e(0x91)][_0x5af45e(0xdc)]['id'],{'headers':{'accept':_0x5af45e(0xdd),'accept-language':_0x5af45e(0x88),'sec-ch-ua':_0x5af45e(0xee),'sec-ch-ua-mobile':'?1','sec-ch-ua-platform':_0x5af45e(0xab),'sec-fetch-dest':_0x515939(0x24c),'sec-fetch-mode':_0x5af45e(0xc3),'sec-fetch-site':_0x5af45e(0x90),'Referer':_0x5af45e(0xb3),'Referrer-Policy':_0x5af45e(0xbe)}}),_0x24fa23={'author':_0x515939(0x201),'result':{'title':_0xb17454[_0x5af45e(0x91)]['result'][_0x5af45e(0xc2)],'artist':_0xb17454['data'][_0x5af45e(0xdc)][_0x5af45e(0x97)],'thumbnail':_0xb17454[_0x5af45e(0x91)][_0x5af45e(0xdc)][_0x5af45e(0xe8)],'url':_0x5af45e(0xd6)+_0xd8d538[_0x5af45e(0x91)][_0x515939(0x1f7)][_0x5af45e(0xb9)],'duration':_0xb17454[_0x5af45e(0x91)][_0x5af45e(0xdc)][_0x5af45e(0xa4)]}};_0x32b87a(_0x24fa23);}catch(_0xefa131){_0x2641d1({'author':_0x5af45e(0x89),'result':_0x5af45e(0xc1)});}});}function _0x23ed(){const _0x2e9ad7=_0x35bf,_0x49df9d=[_0x2e9ad7(0xa6),_0x2e9ad7(0x85),_0x2e9ad7(0xd0),'7138460xsaFBR',_0x2e9ad7(0xe6),'play','html5player.setVideoUrlHigh\x5c(\x27(.*?)\x27\x5c);','&token=G7eRpMaa','get',_0x2e9ad7(0xbb),_0x2e9ad7(0x88),'PHPSESSID=rmer1p00mtkqv64ai0pa429d4o',_0x2e9ad7(0xdf),_0x2e9ad7(0xc2),_0x2e9ad7(0xf4),_0x2e9ad7(0xc0),_0x2e9ad7(0xc4),'msong',_0x2e9ad7(0xeb),_0x2e9ad7(0xb6),_0x2e9ad7(0xe8),_0x2e9ad7(0xa0),_0x2e9ad7(0xae),_0x2e9ad7(0x8f),_0x2e9ad7(0xb5),_0x2e9ad7(0xb1),'each','tbody\x20>\x20tr:nth-child(1)\x20>\x20td:nth-child(4)\x20>\x20a','div.col-md-8.mx-auto\x20>\x20a','Download',_0x2e9ad7(0xd9),_0x2e9ad7(0x8b),_0x2e9ad7(0xd6),_0x2e9ad7(0xe9),_0x2e9ad7(0x8e),_0x2e9ad7(0x8a),_0x2e9ad7(0xa1),_0x2e9ad7(0xc8),_0x2e9ad7(0xcd),_0x2e9ad7(0xb0),_0x2e9ad7(0x9a),'catch',_0x2e9ad7(0xa4),_0x2e9ad7(0xbd),'image','Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Win64;\x20x64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/91.0.4472.124\x20Safari/537.36','axios',_0x2e9ad7(0xd3),_0x2e9ad7(0x83),_0x2e9ad7(0xca),_0x2e9ad7(0xf0),_0x2e9ad7(0xec),_0x2e9ad7(0xf1),_0x2e9ad7(0x96),_0x2e9ad7(0xf6),_0x2e9ad7(0xe3),_0x2e9ad7(0x9c),'trim','instagram',_0x2e9ad7(0xc9),'src','push',_0x2e9ad7(0xb2),_0x2e9ad7(0xe0),_0x2e9ad7(0xf7),_0x2e9ad7(0x9d),_0x2e9ad7(0xd1),_0x2e9ad7(0xaf),_0x2e9ad7(0xef),_0x2e9ad7(0xe2),_0x2e9ad7(0xdc),_0x2e9ad7(0xf8),_0x2e9ad7(0xda),'split',_0x2e9ad7(0xa5),_0x2e9ad7(0x98),_0x2e9ad7(0xe5),_0x2e9ad7(0xc3),_0x2e9ad7(0xab),_0x2e9ad7(0xcf),_0x2e9ad7(0xea),_0x2e9ad7(0xb8),_0x2e9ad7(0x84),'cheerio',_0x2e9ad7(0xac),_0x2e9ad7(0xb4),_0x2e9ad7(0xe4),_0x2e9ad7(0x94),_0x2e9ad7(0xba),_0x2e9ad7(0x8c),'53930xNUGal',_0x2e9ad7(0x87),_0x2e9ad7(0xde),_0x2e9ad7(0xcc),_0x2e9ad7(0xf5),'songid',_0x2e9ad7(0xaa),'download_url',_0x2e9ad7(0xa8),_0x2e9ad7(0xc5),_0x2e9ad7(0xe1),_0x2e9ad7(0x95),_0x2e9ad7(0xce),_0x2e9ad7(0xf3),_0x2e9ad7(0x86),_0x2e9ad7(0xbe),_0x2e9ad7(0xc1),_0x2e9ad7(0x97),_0x2e9ad7(0x89),_0x2e9ad7(0xb3),_0x2e9ad7(0x9f),_0x2e9ad7(0xd7),_0x2e9ad7(0xd2),_0x2e9ad7(0xd8),'span.metadata',_0x2e9ad7(0xd4)];return _0x23ed=function(){return _0x49df9d;},_0x23ed();}function _0x1277(){const _0x404768=['8078OMrQlJ','677244UMcqbv','https://spotifydownload.org/','12019728OFGIXr','current_language=en','tr:nth-child(2)\x20>\x20td:nth-child(4)\x20>\x20a','\x22\x20Not;A\x20Brand\x22;v=\x2299\x22,\x20\x22Google\x20Chrome\x22;v=\x2291\x22,\x20\x22Chromium\x22;v=\x2291\x22','itemlist','4qMpych','msinger','div.row\x20>\x20div.col-md-12\x20>\x20div.row.story-container.mt-4.pb-4.border-bottom','then','6qxWEYq','1481877YWKhBq','map','meta[property=\x22og:video:type\x22]','gid','4910769FDaxgh','div:nth-child(1)\x20>\x20div:nth-child(2)\x20>\x20p','https://api.fabdl.com/spotify/get?url=','replace','\x22Not)A;Brand\x22;v=\x2224\x22,\x20\x22Chromium\x22;v=\x22116\x22','2853843QUZKVi','11mVdoWx','shift','name','attr','html5player.setVideoUrlLow\x5c(\x27(.*?)\x27\x5c);','log','content','meta[property=\x22og:title\x22]','https://www.getfvid.com/downloader','body\x20>\x20div.jumbotron\x20>\x20div\x20>\x20center\x20>\x20div.row\x20>\x20div\x20>\x20div:nth-child(5)\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(3)\x20>\x20td:nth-child(4)\x20>\x20a','https://api.fabdl.com/spotify/mp3-convert-task/','wmid=142420656;\x20user_type=1;\x20country=id;\x20session_key=2a5d97d05dc8fe238150184eaf3519ad;','href','Internal\x20server\x20error','body\x20>\x20div.page-content\x20>\x20div\x20>\x20div\x20>\x20div.col-lg-10.col-md-10.col-centered\x20>\x20div\x20>\x20div:nth-child(3)\x20>\x20div\x20>\x20div.col-md-4.btns-download\x20>\x20p:nth-child(1)\x20>\x20a','cross-site','10XFIPaF','https://saveinsta.io/','4626GpGzxX','application/x-www-form-urlencoded;\x20charset=UTF-8','body\x20>\x20div.page-content\x20>\x20div\x20>\x20div\x20>\x20div.col-lg-10.col-md-10.col-centered\x20>\x20div\x20>\x20div:nth-child(3)\x20>\x20div\x20>\x20div.col-md-4.btns-download\x20>\x20p:nth-child(2)\x20>\x20a','93285ztwbxP','match','url','exports','418730aGjjAI','meta[property=\x22og:video:width\x22]','request','id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7','1096568xfwcMu','public_time','mp3Url','12ZULOHs','malbum','4347FJBKLs','34192vRLtws','1133705wiaXPW','187099TEKTDZ','div.col-md-12\x20>\x20img','empty','meta[property=\x22og:image\x22]','858uoIDGq','a#downloadButton','push','https://api.fabdl.com','11633iaQxOk','stringify','20kqLryi','http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=','entries','https://tikwm.com/api/','3092592Qyzbzg','1504008AfEfAW','application/x-www-form-urlencoded','840vdddiF','imgSrc','11972892INmFQG','html','data','length','6126uNoidm','post','3516OPGjIy','https://saveinsta.io/core/ajax.php','result','58wftcom','music','https://dlpanda.com/id?url=','parse','4LwVPoY','MusicInfoCallback(','artists','text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9','3619856PszwKe','266VxeNOn','load','strict-origin-when-cross-origin','_ga=GA1.2.1388798541.1625064838;\x20_gid=GA1.2.1351476739.1625064838;\x20__gads=ID=7a60905ab10b2596-229566750eca0064:T=1625064837:RT=1625064837:S=ALNI_Mbg3GGC2b3oBVCUJt9UImup-j20Iw;\x20_gat=1','meta[property=\x22og:duration\x22]','cors','POST','https://twdown.net/','text','forEach','Mozilla/5.0\x20(Linux;\x20Android\x2010;\x20K)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/116.0.0.0\x20Mobile\x20Safari/537.36','https://twdown.net/download.php','Nezzx','duration_ms','meta[property=\x22og:video:height\x22]','application/json,\x20text/plain,\x20*/*','div:nth-child(1)\x20>\x20img','&pn=1&sin=0&ein=29&_=','video','#video-player-bg\x20>\x20script:nth-child(6)','floor'];_0x1277=function(){return _0x404768;};return _0x1277();};async function instagram(_0x4d59f6){return new Promise(async(_0x4b25db,_0x3a11ca)=>{const _0x3231e7=_0x4a30,_0xe7c30f=_0x28bd,_0x28d2be=new URLSearchParams(Object[_0xe7c30f(0xdb)]({'url':_0x4d59f6,'host':_0xe7c30f(0xe9)}));await axios[_0xe7c30f(0x94)]({'method':_0xe7c30f(0x92),'baseURL':_0xe7c30f(0xc5),'data':_0x28d2be,'headers':{'content-type':_0xe7c30f(0xa5),'cookie':_0xe7c30f(0xe2),'user-agent':_0x3231e7(0x1fe)}})[_0xe7c30f(0xca)](_0x20e53e=>{const _0x18cefd=_0x35bf,_0x4ae741=_0xe7c30f,_0x3e7385=cheerio[_0x4ae741(0xbd)](_0x20e53e[_0x4ae741(0x91)]),_0x5895e6=_0x3e7385(_0x18cefd(0xe7))[_0x4ae741(0xce)]((_0x48a092,_0x263b25)=>{const _0x549a98=_0x4a30,_0x1863c2=_0x4ae741;return _0x1863c2(0x87)+_0x3e7385(_0x263b25)[_0x1863c2(0xc4)](_0x549a98(0x21e))[_0x549a98(0x242)](_0x1863c2(0x98));})[_0x4ae741(0xb0)](),_0x336d0e={'author':_0x4ae741(0x89),'result':{'media':_0x5895e6}};_0x4b25db(_0x336d0e);})[_0xe7c30f(0xd7)](_0x338700=>{const _0x3df32d=_0xe7c30f;console[_0x3df32d(0xec)](_0x338700),_0x3a11ca({'author':_0x3df32d(0x89),'result':_0x3df32d(0xc1)});});});}async function joox(_0x494495){return new Promise(async(_0x46e0bc,_0xa008b9)=>{const _0x7f4422=_0x4a30,_0x55498d=_0x28bd,_0x10e2f4=Math[_0x55498d(0x9b)](new Date()/0x3e8);try{axios[_0x7f4422(0x20a)]('http://api.joox.com/web-fcgi-bin//web_search?lang=id&country=id&type=0&search_input='+_0x494495+_0x55498d(0xc7)+_0x10e2f4)[_0x7f4422(0x216)](({data:_0x3b693c})=>{const _0x4de84e=_0x7f4422,_0x1c92ac=_0x55498d;let _0x2156a8=[],_0x51556d=[],_0x5625dd=[],_0x237b46=[];_0x3b693c[_0x4de84e(0x258)][_0x4de84e(0x244)](_0xa69361=>{const _0x3e6021=_0x28bd;_0x237b46[_0x3e6021(0x8a)](_0xa69361[_0x3e6021(0xad)]);});for(let _0x4f14ca=0x0;_0x4f14ca<_0x3b693c[_0x4de84e(0x258)][_0x1c92ac(0xf0)];_0x4f14ca++){const _0x21f074=_0x1c92ac(0xd5)+_0x237b46[_0x4f14ca];_0x5625dd[_0x4de84e(0x23f)](axios[_0x1c92ac(0xb0)](_0x21f074,{'headers':{'Cookie':_0x1c92ac(0x8f)}})[_0x1c92ac(0xca)](({data:_0xae354f})=>{const _0x38c59f=_0x4de84e,_0x4860cf=_0x1c92ac,_0x5cf0ac=JSON[_0x38c59f(0x20f)](_0xae354f[_0x4860cf(0x8b)](_0x4860cf(0xb8),'')[_0x4860cf(0x8b)]('\x0a)',''));_0x51556d[_0x4860cf(0x8a)]({'sound':_0x5cf0ac[_0x4860cf(0x9d)],'album':_0x5cf0ac[_0x38c59f(0x1fc)],'penyanyi':_0x5cf0ac[_0x38c59f(0x206)],'publish':_0x5cf0ac[_0x4860cf(0x95)],'img':_0x5cf0ac[_0x4860cf(0xa8)],'mp3':_0x5cf0ac[_0x4860cf(0xef)]}),Promise[_0x4860cf(0xd9)](_0x5625dd)[_0x38c59f(0x216)](()=>_0x46e0bc({'author':_0x4860cf(0x89),'result':_0x51556d}));})[_0x1c92ac(0xd7)](_0xa008b9));}})[_0x55498d(0xd7)](_0xa008b9);}catch(_0x10de7c){_0xa008b9({'author':_0x7f4422(0x201),'result':_0x55498d(0xc1)});}});}async function xnxx(_0x1f21bc){return new Promise((_0x44beb6,_0x20b509)=>{const _0x124d55=_0x28bd;axios(''+_0x1f21bc,{'method':_0x124d55(0xb0)})[_0x124d55(0xca)](_0x2ef696=>_0x2ef696[_0x124d55(0x91)])[_0x124d55(0xca)](_0x304aac=>{const _0x28fede=_0x35bf,_0x328405=_0x4a30,_0x265891=_0x124d55;let _0x13b39c=cheerio[_0x328405(0x23d)](_0x304aac,{'xmlMode':!0x1});const _0x443e18=_0x13b39c(_0x265891(0xc0))[_0x28fede(0xf7)](_0x265891(0xcc)),_0x532450=_0x13b39c(_0x265891(0xed))[_0x328405(0x242)](_0x265891(0xcc)),_0xb7f98d=_0x13b39c(_0x265891(0xdf))[_0x265891(0xd3)](_0x265891(0xcc)),_0x5c2b6d=_0x13b39c(_0x265891(0xd2))[_0x328405(0x242)](_0x265891(0xcc)),_0x539639=_0x13b39c(_0x265891(0xeb))[_0x265891(0xd3)](_0x265891(0xcc)),_0x37c830=_0x13b39c(_0x328405(0x222))[_0x265891(0xd3)](_0x328405(0x254)),_0x31b7bf=_0x13b39c(_0x265891(0xd0))[_0x265891(0x99)]()[_0x328405(0x23b)](),_0xdbe0ff=_0x13b39c(_0x265891(0xd8))[_0x265891(0x93)](),_0x1d0bb7={'low':(_0xdbe0ff[_0x265891(0xc8)](_0x265891(0xa3))||[])[0x1],'high':_0xdbe0ff[_0x265891(0xc8)](_0x265891(0x8d))[0x1]};_0x44beb6({'author':_0x328405(0x201),'result':{'title':_0x443e18,'duration':_0x532450,'thumbnail':_0xb7f98d,'info':_0x31b7bf,'media':_0x1d0bb7}});})[_0x124d55(0xd7)](_0x127798=>_0x20b509({'author':_0x124d55(0x89),'result':_0x124d55(0xc1)}));});}async function facebook(_0x9f35ce){return new Promise(async(_0x24f67d,_0x4a0518)=>{const _0x1cfc1f=_0x4a30,_0x26a465=_0x28bd;let _0x36cd01={'url':_0x9f35ce};axios(_0x26a465(0xa6),{'method':_0x1cfc1f(0x1f4),'data':new URLSearchParams(Object[_0x1cfc1f(0x245)](_0x36cd01)),'headers':{'content-type':_0x1cfc1f(0x1fb),'user-agent':_0x26a465(0xe3),'cookie':'_ga=GA1.2.1310699039.1624884412;\x20_pbjs_userid_consent_data=3524755945110770;\x20cto_bidid=rQH5Tl9NNm5IWFZsem00SVVuZGpEd21sWnp0WmhUeTZpRXdkWlRUOSUyQkYlMkJQQnJRSHVPZ3Fhb1R2UUFiTWJuVGlhVkN1TGM2anhDT1M1Qk0ydHlBb21LJTJGNkdCOWtZalRtZFlxJTJGa3FVTG1TaHlzdDRvJTNE;\x20cto_bundle=g1Ka319NaThuSmh6UklyWm5vV2pkb3NYaUZMeWlHVUtDbVBmeldhNm5qVGVwWnJzSUElMkJXVDdORmU5VElvV2pXUTJhQ3owVWI5enE1WjJ4ZHR5NDZqd1hCZnVHVGZmOEd0eURzcSUyQkNDcHZsR0xJcTZaRFZEMDkzUk1xSmhYMlY0TTdUY0hpZm9NTk5GYXVxWjBJZTR0dE9rQmZ3JTNEJTNE;\x20_gid=GA1.2.908874955.1625126838;\x20__gads=ID=5be9d413ff899546-22e04a9e18ca0046:T=1625126836:RT=1625126836:S=ALNI_Ma0axY94aSdwMIg95hxZVZ-JGNT2w;\x20cookieconsent_status=dismiss'}})[_0x26a465(0xca)](async({data:_0x23af10})=>{const _0x58726c=_0x35bf,_0x20f2e4=_0x1cfc1f,_0x5ae48d=_0x26a465,_0xd60ed4=cheerio[_0x5ae48d(0xbd)](_0x23af10);_0x24f67d({'author':_0x5ae48d(0x89),'result':{'low':_0xd60ed4(_0x20f2e4(0x25b))[_0x5ae48d(0xd3)](_0x5ae48d(0x98)),'high':_0xd60ed4(_0x20f2e4(0x25b))[_0x5ae48d(0xd3)](_0x5ae48d(0x98)),'audio':_0xd60ed4(_0x58726c(0x92))[_0x5ae48d(0xd3)](_0x5ae48d(0x98))}});})[_0x26a465(0xd7)](_0x4a0518);});}async function mediafire(_0x56f666){return new Promise(async(_0x35e4eb,_0xe145f5)=>{const _0x1e2f86=_0x35bf,_0x32470b=_0x4a30,_0x57edb3=_0x28bd;try{const _0x36df10=await axios[_0x57edb3(0xb0)](_0x56f666),_0x5f28e3=cheerio[_0x57edb3(0xbd)](_0x36df10[_0x57edb3(0x91)]),_0x2109af=_0x5f28e3(_0x32470b(0x264))[_0x57edb3(0xd3)](_0x32470b(0x225)),_0x3a87e2=_0x5f28e3(_0x1e2f86(0xa8))[_0x57edb3(0x99)]()[_0x32470b(0x236)](_0x57edb3(0xaf),'')[_0x57edb3(0x8b)]('(','')[_0x57edb3(0x8b)](')','')[_0x57edb3(0x8b)]('\x0a','')[_0x32470b(0x236)]('\x0a','')[_0x57edb3(0x8b)]('','')[_0x57edb3(0xe0)](),_0x3920d6=_0x2109af[_0x57edb3(0x9e)]('/'),_0xa41d65=_0x3920d6[0x5],_0x77166d=_0xa41d65[_0x57edb3(0x9e)]('.')[0x1];_0x35e4eb({'author':_0x57edb3(0x89),'result':{'title':_0xa41d65,'size':_0x3a87e2,'mime':_0x77166d,'link':_0x2109af}});}catch(_0xcec4df){_0xe145f5({'author':_0x57edb3(0x89),'result':_0x1e2f86(0x8b)});}});}function _0x28bd(_0x12d471,_0x5b0a49){const _0x2819a0=_0x90c0();return _0x28bd=function(_0x1bf7d1,_0x1e6522){_0x1bf7d1=_0x1bf7d1-0x86;let _0x3d8542=_0x2819a0[_0x1bf7d1];return _0x3d8542;},_0x28bd(_0x12d471,_0x5b0a49);}async function twitter(_0x2d167b){return new Promise(async(_0x38665e,_0x125f67)=>{const _0x4ba88c=_0x4a30,_0x11a71f=_0x28bd;let _0xb1f007={'URL':_0x2d167b};axios[_0x11a71f(0xa7)](_0x11a71f(0xa0),qs[_0x11a71f(0xe4)](_0xb1f007),{'headers':{'accept':_0x11a71f(0xb6),'sec-ch-ua':_0x4ba88c(0x239),'user-agent':_0x11a71f(0xe3),'cookie':_0x11a71f(0xcd)}})[_0x11a71f(0xca)](({data:_0x3da0fb})=>{const _0x24aad9=_0x35bf,_0xe8a140=_0x4ba88c,_0x3de365=_0x11a71f,_0x2e3567=cheerio[_0x3de365(0xbd)](_0x3da0fb);_0x38665e({'author':_0x3de365(0x89),'result':{'desc':_0x2e3567(_0x3de365(0xc9))[_0x24aad9(0xd0)]()[_0x3de365(0xe0)](),'thumb':_0x2e3567(_0x3de365(0xcb))[_0x3de365(0xd3)](_0x3de365(0xe1)),'low':_0x2e3567(_0x3de365(0x9f))[_0x3de365(0xd3)](_0x3de365(0x98)),'high':_0x2e3567(_0x3de365(0x9c))[_0x3de365(0xd3)](_0xe8a140(0x225)),'audio':_0x3de365(0x96)+_0x2e3567(_0x3de365(0xbf))[_0x3de365(0xd3)](_0x3de365(0x98))}});})[_0x11a71f(0xd7)](_0x125f67);});}module[_0x1a277f(0xd4)]={'tiktok':tiktok,'spotify':spotify,'instagram':instagram,'joox':joox,'xnxx':xnxx,'facebook':facebook,'mediafire':mediafire,'twitter':twitter};