almtools 1.0.8 → 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,20 +2,25 @@ const {
2
2
  tiktok,
3
3
  spotify,
4
4
  instagram,
5
- joox,
6
- xnxx,
7
5
  facebook,
8
- mediafire,
9
6
  twitter,
10
- videy
7
+ douyin,
8
+ snackvideo,
9
+ capcut
11
10
  } = require("./lib/tools.js")
11
+ const { generateQC } = require("./lib/tools.js")
12
12
 
13
13
  module.exports.tiktok = tiktok
14
14
  module.exports.spotify = spotify
15
15
  module.exports.instagram = instagram
16
- module.exports.joox = joox
17
- module.exports.xnxx = xnxx
18
16
  module.exports.facebook = facebook
19
- module.exports.mediafire = mediafire
20
17
  module.exports.twitter = twitter
21
- module.exports.videy = videy
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.8",
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(_0x57dceb,_0x3d25be){const _0x20c0d7=_0xc4bb,_0x5087bc=_0x57dceb();while(!![]){try{const _0x48838a=-parseInt(_0x20c0d7(0x162))/0x1*(-parseInt(_0x20c0d7(0x18c))/0x2)+-parseInt(_0x20c0d7(0x154))/0x3*(parseInt(_0x20c0d7(0x1bf))/0x4)+-parseInt(_0x20c0d7(0x1bb))/0x5*(-parseInt(_0x20c0d7(0x16e))/0x6)+parseInt(_0x20c0d7(0x187))/0x7+-parseInt(_0x20c0d7(0x165))/0x8*(-parseInt(_0x20c0d7(0x188))/0x9)+-parseInt(_0x20c0d7(0x1c4))/0xa+parseInt(_0x20c0d7(0x19b))/0xb;if(_0x48838a===_0x3d25be)break;else _0x5087bc['push'](_0x5087bc['shift']());}catch(_0x5e928f){_0x5087bc['push'](_0x5087bc['shift']());}}}(_0x2ec7,0x2ba4c),function(_0x2f8278,_0x5bebcf){const _0x4bc90a=_0xc4bb,_0x172d45=_0x3ef6,_0x6d29f3=_0x2f8278();while(!![]){try{const _0x1b6b55=parseInt(_0x172d45(0x1fe))/0x1*(-parseInt(_0x172d45(0x1d6))/0x2)+parseInt(_0x172d45(0x210))/0x3*(parseInt(_0x172d45(0x1dd))/0x4)+parseInt(_0x172d45(0x22d))/0x5*(parseInt(_0x172d45(0x23a))/0x6)+parseInt(_0x172d45(0x1de))/0x7*(-parseInt(_0x172d45(0x238))/0x8)+parseInt(_0x172d45(0x237))/0x9+-parseInt(_0x172d45(0x1d8))/0xa+parseInt(_0x172d45(0x239))/0xb;if(_0x1b6b55===_0x5bebcf)break;else _0x6d29f3[_0x4bc90a(0x1a2)](_0x6d29f3[_0x4bc90a(0x181)]());}catch(_0x30aed3){_0x6d29f3[_0x4bc90a(0x1a2)](_0x6d29f3['shift']());}}}(_0x5eb9,0x7c71d));function _0x2276(){const _0x924245=_0xc4bb,_0x22c53b=_0x3ef6,_0x39ea3a=[_0x924245(0x19f),_0x924245(0x19a),_0x22c53b(0x1e6),_0x22c53b(0x205),_0x22c53b(0x1e8),_0x22c53b(0x1e7),_0x924245(0x14a),_0x22c53b(0x232),_0x22c53b(0x241),_0x22c53b(0x247),_0x22c53b(0x207),_0x924245(0x15f),_0x924245(0x167),_0x22c53b(0x1db),_0x22c53b(0x219),_0x22c53b(0x1e1),_0x924245(0x1b5),_0x924245(0x1bd),_0x924245(0x1b9),_0x22c53b(0x1f0),_0x924245(0x1b4),_0x924245(0x14d),_0x22c53b(0x23f),_0x22c53b(0x225),_0x22c53b(0x1e5),_0x22c53b(0x1f2),_0x22c53b(0x213),_0x22c53b(0x1ec),_0x22c53b(0x1f9),_0x22c53b(0x1fa),_0x22c53b(0x1ed),_0x22c53b(0x228),_0x22c53b(0x240),_0x22c53b(0x243),_0x22c53b(0x21c),_0x22c53b(0x224),_0x22c53b(0x246),_0x22c53b(0x20a),_0x924245(0x171),_0x22c53b(0x231),_0x22c53b(0x1e9),_0x22c53b(0x22c),_0x924245(0x193),_0x22c53b(0x1ea),_0x924245(0x1c0),_0x22c53b(0x1ee),_0x924245(0x155),_0x22c53b(0x236),_0x22c53b(0x202),_0x22c53b(0x20b),_0x924245(0x1af),_0x22c53b(0x20d),_0x22c53b(0x21e),_0x22c53b(0x1d9),_0x22c53b(0x234),_0x22c53b(0x215),_0x924245(0x172),_0x22c53b(0x1da),_0x924245(0x1b0),_0x22c53b(0x23d),_0x22c53b(0x1f3),_0x924245(0x198),_0x22c53b(0x235),_0x22c53b(0x1ef),_0x22c53b(0x1fc),_0x22c53b(0x230),_0x924245(0x17c),_0x22c53b(0x248),_0x924245(0x1b7),_0x22c53b(0x229),_0x22c53b(0x214),_0x22c53b(0x203),_0x22c53b(0x1fd),_0x22c53b(0x1f4),_0x22c53b(0x1dc),_0x924245(0x176),_0x22c53b(0x22e),_0x22c53b(0x22b),_0x22c53b(0x1f5),'meta[property=\x22og:video:height\x22]',_0x22c53b(0x1e0),'match',_0x22c53b(0x1f1),_0x22c53b(0x220),_0x924245(0x163),_0x22c53b(0x1fb),_0x22c53b(0x206),_0x22c53b(0x20e),_0x22c53b(0x1ff),'job_id',_0x22c53b(0x21a),_0x22c53b(0x249),_0x22c53b(0x221),'\x22Not)A;Brand\x22;v=\x2224\x22,\x20\x22Chromium\x22;v=\x22116\x22',_0x22c53b(0x24a),_0x22c53b(0x204),_0x22c53b(0x201),_0x22c53b(0x245),_0x924245(0x179),_0x22c53b(0x21d),_0x924245(0x18b),_0x22c53b(0x21f),_0x22c53b(0x1d5),_0x22c53b(0x20f),_0x22c53b(0x1f7),_0x22c53b(0x216),_0x22c53b(0x1e2),'empty',_0x924245(0x1aa),_0x22c53b(0x1e4),_0x22c53b(0x222),_0x22c53b(0x233),_0x22c53b(0x24b),'http://api.joox.com/web-fcgi-bin//web_search?lang=id&country=id&type=0&search_input=',_0x22c53b(0x1df),_0x924245(0x178),_0x924245(0x195),_0x22c53b(0x1f6),_0x22c53b(0x1eb),'path',_0x22c53b(0x218),_0x22c53b(0x244),_0x924245(0x156),_0x22c53b(0x223)];return _0x2276=function(){return _0x39ea3a;},_0x2276();}const _0xaed99b=_0x48e2;(function(_0x505346,_0x2bb71b){const _0x26f7b7=_0xc4bb,_0x52010d=_0x3ef6,_0xfeae72=_0x48e2,_0x3f0a79=_0x505346();while(!![]){try{const _0x147154=parseInt(_0xfeae72(0xa1))/0x1+-parseInt(_0xfeae72(0xb8))/0x2+parseInt(_0xfeae72(0xda))/0x3+-parseInt(_0xfeae72(0xb1))/0x4+parseInt(_0xfeae72(0xd3))/0x5*(-parseInt(_0xfeae72(0x8e))/0x6)+-parseInt(_0xfeae72(0xc3))/0x7*(parseInt(_0xfeae72(0x93))/0x8)+parseInt(_0xfeae72(0x9e))/0x9*(parseInt(_0xfeae72(0x88))/0xa);if(_0x147154===_0x2bb71b)break;else _0x3f0a79[_0x52010d(0x1ee)](_0x3f0a79[_0x26f7b7(0x181)]());}catch(_0x2b80b6){_0x3f0a79[_0x52010d(0x1ee)](_0x3f0a79[_0x52010d(0x20c)]());}}}(_0x2276,0xae3ba));const cheerio=require(_0xaed99b(0xdf)),axios=require(_0xaed99b(0x83)),qs=require('qs');async function tiktok(_0x55196e){return new Promise(async(_0x2cee8d,_0x19b8f6)=>{const _0x10936a=_0xc4bb,_0x45569b=_0x3ef6,_0x846ff2=_0x48e2;try{const _0xf71a85=new URLSearchParams();_0xf71a85[_0x846ff2(0xf2)](_0x846ff2(0xf3),_0x55196e),_0xf71a85[_0x846ff2(0xf2)]('hd','1');const _0x1227b1=await axios({'method':_0x846ff2(0xba),'url':_0x846ff2(0xcd),'headers':{'Content-Type':_0x846ff2(0xdb),'Cookie':_0x846ff2(0xa8),'User-Agent':_0x846ff2(0xf4)},'data':_0xf71a85}),_0x4d07c0=await axios[_0x45569b(0x205)](_0x846ff2(0xe3)+_0x55196e+_0x846ff2(0xd1)),_0x53509e=cheerio[_0x45569b(0x246)](_0x4d07c0[_0x846ff2(0xfd)]);let _0x195cf6=[],_0x57ceab=[];_0x53509e(_0x10936a(0x1c1))[_0x846ff2(0xa4)]((_0x1aa3e0,_0x1958ab)=>{const _0x169d9e=_0x45569b,_0x4057a6=_0x846ff2;_0x195cf6[_0x169d9e(0x1ee)](_0x53509e(_0x1958ab)[_0x4057a6(0xe0)](_0x4057a6(0x8a)));}),_0x57ceab[_0x846ff2(0xe1)]({'img':_0x195cf6});let _0x2452ee=_0x195cf6[_0x846ff2(0xbd)]((_0x986286,_0x1748ea)=>{return _0x986286;});const _0x5bf611=_0x1227b1[_0x846ff2(0xfd)][_0x45569b(0x1f4)];let _0x5e5fc1;_0x2452ee[_0x45569b(0x23b)]===0x0?_0x5e5fc1={'status':!![],'author':_0x846ff2(0xfa),'result':{'title':_0x5bf611[_0x846ff2(0xd9)],'mediatype':_0x846ff2(0x8d),'media':_0x5bf611[_0x846ff2(0xab)],'audio':_0x5bf611[_0x846ff2(0xc6)]}}:_0x5e5fc1={'status':!![],'author':_0x846ff2(0xfa),'result':{'title':_0x5bf611[_0x45569b(0x20a)],'mediatype':_0x45569b(0x219),'media':_0x2452ee,'audio':_0x5bf611[_0x846ff2(0xc6)]}},_0x2cee8d(_0x5e5fc1);}catch(_0x4f578f){_0x19b8f6({'status':![],'author':_0x45569b(0x214),'result':new Error(_0x4f578f)[_0x846ff2(0x9f)]});}});}async function spotify(_0x4b1105){return new Promise(async(_0x4db5df,_0x1d3f37)=>{const _0x5c5f21=_0xc4bb,_0x33a8fe=_0x3ef6,_0x18969e=_0x48e2;try{const _0x47be9e=await axios[_0x18969e(0xb7)](_0x18969e(0xee)+encodeURIComponent(_0x4b1105),{'headers':{'accept':_0x18969e(0x8b),'accept-language':_0x18969e(0xce),'sec-ch-ua':_0x18969e(0x95),'sec-ch-ua-mobile':'?1','sec-ch-ua-platform':_0x18969e(0x94),'sec-fetch-dest':_0x18969e(0xa3),'sec-fetch-mode':_0x18969e(0xad),'sec-fetch-site':_0x18969e(0xea),'Referer':_0x18969e(0xd4),'Referrer-Policy':_0x18969e(0xd7)}}),_0xbfb56b=await axios[_0x18969e(0xb7)](_0x18969e(0x8f)+_0x47be9e[_0x18969e(0xfd)][_0x33a8fe(0x241)][_0x18969e(0xa0)]+'/'+_0x47be9e[_0x18969e(0xfd)][_0x18969e(0xbc)]['id'],{'headers':{'accept':'application/json,\x20text/plain,\x20*/*','accept-language':_0x18969e(0xce),'sec-ch-ua':_0x18969e(0x95),'sec-ch-ua-mobile':'?1','sec-ch-ua-platform':_0x18969e(0x94),'sec-fetch-dest':_0x18969e(0xa3),'sec-fetch-mode':_0x33a8fe(0x1f6),'sec-fetch-site':_0x18969e(0xea),'Referer':_0x33a8fe(0x240),'Referrer-Policy':_0x18969e(0xd7)}}),_0x11f876={'status':!![],'author':_0x33a8fe(0x214),'result':{'title':_0x47be9e[_0x18969e(0xfd)][_0x18969e(0xbc)][_0x18969e(0xb2)],'artist':_0x47be9e[_0x18969e(0xfd)][_0x5c5f21(0x192)][_0x33a8fe(0x22f)],'thumbnail':_0x47be9e[_0x18969e(0xfd)][_0x33a8fe(0x241)][_0x18969e(0xc2)],'url':_0x33a8fe(0x22a)+_0xbfb56b[_0x18969e(0xfd)][_0x18969e(0xbc)][_0x18969e(0xf8)],'duration':_0x47be9e[_0x18969e(0xfd)][_0x18969e(0xbc)][_0x33a8fe(0x21b)]}};_0x4db5df(_0x11f876);}catch(_0x5981b6){_0x1d3f37({'status':![],'author':_0x18969e(0xfa),'result':new Error(_0x5981b6)[_0x18969e(0x9f)]});}});}function _0x2ec7(){const _0x53cb09=['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','7965140HIYbMN','html5player.setVideoUrlLow\x5c(\x27(.*?)\x27\x5c);','get','length','title','html','34207wjOPku','stringify','cors','15376uCZAEN','application/json,\x20text/plain,\x20*/*','songid','entries','7010rYsgSh','itemlist','src','malbum','Invalid\x20Url','79842UTDLeN','duration_ms','Windows','1151682uEprcU','post','cross-site','mp3Url','set','axios','http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=','play','u=1,\x20i','_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','2125176IxDPWj','Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Win64;\x20x64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/128.0.0.0\x20Safari/537.36','1815RjyocS','https://api.fabdl.com/spotify/mp3-convert-task/','load','a#downloadButton','shift','752347mrfmnI','strict-origin-when-cross-origin','https://api.fabdl.com','gzip,\x20deflate,\x20br,\x20zstd','MusicInfoCallback(','1176805nDMxEp','783aCfnxI','https://twdown.net/download.php','message','https://app.publer.io/hooks/media','10IdfIBL','https://www.getfvid.com/downloader','artists','https://publer.io/','msong','8vLYyWS','result','\x22Chromium\x22;v=\x22128\x22,\x20\x22Not\x20A\x20Brand\x22;v=\x2224\x22,\x20\x22Google\x20Chrome\x22;v=\x22128\x22','application/x-www-form-urlencoded;\x20charset=UTF-8','content','working','video','catch','1003384joYsVu','application/x-www-form-urlencoded','1854567GRhSor','\x22Android\x22','Download','25553946mJzvic','photo','&pn=1&sin=0&ein=29&_=','type','push','https://dlpanda.com/id?url=','5081013ulVhgK','172nvhbzH','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','replace','url','payload','each','meta[property=\x22og:title\x22]','https://twdown.net/','Mozilla/5.0\x20(Linux;\x20Android\x2010;\x20K)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/116.0.0.0\x20Mobile\x20Safari/537.36','source','exports','https://api.fabdl.com/spotify/get?url=','splice','status','id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7','\x22\x20Not;A\x20Brand\x22;v=\x2299\x22,\x20\x22Google\x20Chrome\x22;v=\x2291\x22,\x20\x22Chromium\x22;v=\x2291\x22','floor','https://spotifydownload.org/','download_url','gid','music','reverse','25RZUSyz','wmid=142420656;\x20user_type=1;\x20country=id;\x20session_key=2a5d97d05dc8fe238150184eaf3519ad;','split','msinger','16dvdRKk','attr','div.col-md-12\x20>\x20img','27gbKyaO','join','3516360SchSIg','div:nth-child(1)\x20>\x20img','all','_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','map','POST','https://app.publer.io/api/v1/job_status/','public_time','tr:nth-child(2)\x20>\x20td:nth-child(4)\x20>\x20a','data','current_language=en','application/json,\x20text/plain,\x20/','span.metadata','text','parse','158322qtwdbW','then','name','5465790KCFyUx','meta[property=\x22og:duration\x22]','2NjfqHe','7580kVlXak'];_0x2ec7=function(){return _0x53cb09;};return _0x2ec7();};async function instagram(_0x16b6c6){return new Promise(async(_0x9647f4,_0x1a39c3)=>{const _0x473cb2=_0x3ef6,_0x405a87=_0x48e2;if(!_0x16b6c6[_0x405a87(0x89)](/\/(reel|reels|p|stories|tv|s)\/[a-zA-Z0-9_-]+/i))return ect({'status':![],'creator':_0x405a87(0xfa),'msg':_0x405a87(0xf9)});try{let _0x10cdde=await(await axios[_0x405a87(0xec)](_0x405a87(0x9c),{'url':_0x16b6c6,'iphone':![]},{'headers':{'Accept':'/','Accept-Encoding':_0x405a87(0xe4),'Accept-Language':_0x405a87(0x92),'Cache-Control':_0x473cb2(0x232),'Origin':_0x405a87(0xe5),'Pragma':_0x405a87(0xbb),'Priority':_0x405a87(0x9a),'Referer':_0x405a87(0xaa),'Sec-CH-UA':_0x405a87(0xde),'Sec-CH-UA-Mobile':'?0','Sec-CH-UA-Platform':'Windows','User-Agent':_0x405a87(0xf6)}}))[_0x473cb2(0x1f4)][_0x405a87(0x91)],_0x116370=_0x405a87(0xca),_0x94929e;while(_0x116370!==_0x405a87(0x82)){_0x94929e=await axios[_0x405a87(0xb7)](_0x405a87(0x86)+_0x10cdde,{'headers':{'Accept':_0x405a87(0xa6),'Accept-Encoding':_0x405a87(0xe4),'Accept-Language':_0x405a87(0x92),'Cache-Control':_0x405a87(0xbb),'Origin':_0x473cb2(0x20b),'Pragma':_0x405a87(0xbb),'Priority':_0x473cb2(0x1e3),'Referer':_0x405a87(0xaa),'Sec-CH-UA':_0x473cb2(0x200),'Sec-CH-UA-Mobile':'?0','Sec-CH-UA-Platform':_0x405a87(0xf5),'User-Agent':_0x405a87(0xf6)}}),_0x116370=_0x94929e[_0x405a87(0xfd)][_0x405a87(0xb0)];}let _0x52777c=_0x94929e[_0x405a87(0xfd)][_0x473cb2(0x212)][_0x405a87(0xbd)](_0x3f9e62=>{const _0x825f6=_0x473cb2,_0x178d66=_0x405a87;return{'type':_0x3f9e62[_0x825f6(0x242)]===_0x178d66(0xb4)?_0x178d66(0xc2):_0x178d66(0x8d),'url':_0x3f9e62[_0x178d66(0xaf)]};}),_0x469337={'status':!![],'author':_0x405a87(0xfa),'data':_0x52777c};_0x9647f4(_0x469337);}catch(_0x81702){let _0x3da024={'status':![],'author':_0x405a87(0xfa),'result':new Error(_0x81702)[_0x405a87(0x9f)]};_0x1a39c3(_0x3da024);}});}function _0x3ef6(_0x149642,_0x3134ab){const _0x302b7d=_0x5eb9();return _0x3ef6=function(_0x20090d,_0x1c519a){_0x20090d=_0x20090d-0x1d5;let _0xa18561=_0x302b7d[_0x20090d];return _0xa18561;},_0x3ef6(_0x149642,_0x3134ab);}async function joox(_0x47b222){return new Promise(async(_0x44e5b0,_0x5a9d40)=>{const _0xa34a9e=_0x3ef6,_0xb1598e=_0x48e2,_0x42a83c=Math[_0xb1598e(0xc4)](new Date()/0x3e8);try{axios[_0xb1598e(0xb7)](_0xb1598e(0xa9)+_0x47b222+_0xa34a9e(0x226)+_0x42a83c)[_0xb1598e(0xe2)](({data:_0x2be18})=>{const _0x1917f7=_0xb1598e;let _0x4e8b7a=[],_0x2f24b1=[],_0x208b73=[],_0x4be30a=[];_0x2be18[_0x1917f7(0xd5)][_0x1917f7(0xcc)](_0x7aa641=>{const _0xef2ba7=_0x3ef6,_0x2c56ec=_0x1917f7;_0x4be30a[_0xef2ba7(0x1ee)](_0x7aa641[_0x2c56ec(0xc0)]);});for(let _0x3abd22=0x0;_0x3abd22<_0x2be18[_0x1917f7(0xd5)][_0x1917f7(0xbf)];_0x3abd22++){const _0x2b3829=_0x1917f7(0xe7)+_0x4be30a[_0x3abd22];_0x208b73[_0x1917f7(0xe1)](axios[_0x1917f7(0xb7)](_0x2b3829,{'headers':{'Cookie':_0x1917f7(0x9b)}})[_0x1917f7(0xe2)](({data:_0x5f0d0f})=>{const _0x5bc1c8=_0x3ef6,_0x576f02=_0x1917f7,_0x4bf1c2=JSON[_0x576f02(0xdc)](_0x5f0d0f[_0x576f02(0xf0)](_0x5bc1c8(0x23e),'')[_0x576f02(0xf0)]('\x0a)',''));_0x2f24b1[_0x576f02(0xe1)]({'sound':_0x4bf1c2[_0x576f02(0x96)],'album':_0x4bf1c2[_0x576f02(0xef)],'penyanyi':_0x4bf1c2[_0x576f02(0xd6)],'publish':_0x4bf1c2[_0x5bc1c8(0x1d7)],'img':_0x4bf1c2['imgSrc'],'mp3':_0x4bf1c2[_0x576f02(0xeb)]}),Promise[_0x576f02(0x9d)](_0x208b73)[_0x576f02(0xe2)](()=>_0x44e5b0({'status':!![],'author':_0x576f02(0xfa),'result':_0x2f24b1}));})[_0x1917f7(0xf1)](_0x5a9d40));}})[_0xb1598e(0xf1)](_0x5a9d40);}catch(_0x3574b7){_0x5a9d40({'status':![],'author':_0xb1598e(0xfa),'result':new Error(_0x3574b7)['message']});}});}async function xnxx(_0x58bcb0){return new Promise((_0x5183bd,_0x268c2e)=>{const _0x51a4a=_0x3ef6,_0x2705a4=_0x48e2;try{axios(''+_0x58bcb0,{'method':_0x51a4a(0x205)})[_0x2705a4(0xe2)](_0x595932=>_0x595932[_0x2705a4(0xfd)])[_0x2705a4(0xe2)](_0x3c83fb=>{const _0x3c17c4=_0xc4bb,_0x55f822=_0x51a4a,_0x367f33=_0x2705a4;let _0x5f1cfc=cheerio[_0x55f822(0x246)](_0x3c83fb,{'xmlMode':!0x1});const _0x4406f3=_0x5f1cfc(_0x367f33(0x98))[_0x55f822(0x211)](_0x55f822(0x1f8)),_0x5f34be=_0x5f1cfc(_0x55f822(0x217))[_0x55f822(0x211)](_0x367f33(0xac)),_0x5a4171=_0x5f1cfc(_0x367f33(0xfb))[_0x367f33(0xe0)](_0x55f822(0x1f8)),_0x41451b=_0x5f1cfc(_0x367f33(0xae))[_0x3c17c4(0x1c0)](_0x55f822(0x1f8)),_0x1767a9=_0x5f1cfc(_0x367f33(0xfc))[_0x367f33(0xe0)](_0x367f33(0xac)),_0x25442d=_0x5f1cfc(_0x367f33(0x87))[_0x3c17c4(0x1c0)](_0x367f33(0xac)),_0x48253c=_0x5f1cfc(_0x367f33(0x90))[_0x367f33(0xcb)]()[_0x367f33(0xd0)](),_0x3c9953=_0x5f1cfc(_0x367f33(0xcf))[_0x367f33(0xdd)](),_0x475a7a={'low':(_0x3c9953[_0x367f33(0x89)](_0x367f33(0x85))||[])[0x1],'high':_0x3c9953[_0x367f33(0x89)](_0x55f822(0x209))[0x1]};_0x5183bd({'status':![],'author':_0x367f33(0xfa),'result':{'title':_0x4406f3,'duration':_0x5f34be,'thumbnail':_0x5a4171,'info':_0x48253c,'media':_0x475a7a}});});}catch(_0x46df22){_0x268c2e({'status':![],'author':_0x2705a4(0xfa),'result':new Error(_0x46df22)[_0x51a4a(0x20f)]});}});}function _0x5eb9(){const _0x1973aa=_0xc4bb,_0x13eb0d=[_0x1973aa(0x199),_0x1973aa(0x153),'cheerio','meta[property=\x22og:video:type\x22]','#video-player-bg\x20>\x20script:nth-child(6)',_0x1973aa(0x1c5),_0x1973aa(0x1a2),_0x1973aa(0x1a8),_0x1973aa(0x189),_0x1973aa(0x16b),'https://tikwm.com/api/',_0x1973aa(0x1a7),_0x1973aa(0x14e),_0x1973aa(0x14b),_0x1973aa(0x164),_0x1973aa(0x1b8),_0x1973aa(0x195),'trim','&token=G7eRpMaa',_0x1973aa(0x197),_0x1973aa(0x1ad),'meta[property=\x22og:video:width\x22]',_0x1973aa(0x182),_0x1973aa(0x151),_0x1973aa(0x193),_0x1973aa(0x1ab),_0x1973aa(0x185),'meta[property=\x22og:image\x22]',_0x1973aa(0x1ba),_0x1973aa(0x15e),'3666JkaARV','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','tbody\x20>\x20tr:nth-child(1)\x20>\x20td:nth-child(4)\x20>\x20a','html5player.setVideoUrlHigh\x5c(\x27(.*?)\x27\x5c);',_0x1973aa(0x160),'https://publer.io',_0x1973aa(0x181),_0x1973aa(0x177),_0x1973aa(0x17e),'message',_0x1973aa(0x17d),_0x1973aa(0x1c0),_0x1973aa(0x1a9),_0x1973aa(0x1b3),'Nezzx',_0x1973aa(0x174),'1375148lfAliT',_0x1973aa(0x158),_0x1973aa(0x1b2),'image','es-ES,es;q=0.9',_0x1973aa(0x16f),_0x1973aa(0x1be),_0x1973aa(0x1bc),'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',_0x1973aa(0x1c6),_0x1973aa(0x166),_0x1973aa(0x19c),_0x1973aa(0x150),_0x1973aa(0x19d),_0x1973aa(0x183),_0x1973aa(0x152),_0x1973aa(0x1a0),_0x1973aa(0x1ac),_0x1973aa(0x15a),_0x1973aa(0x16d),_0x1973aa(0x184),_0x1973aa(0x15d),_0x1973aa(0x161),_0x1973aa(0x169),_0x1973aa(0x1c7),_0x1973aa(0x18e),_0x1973aa(0x170),_0x1973aa(0x194),'no-cache','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',_0x1973aa(0x173),_0x1973aa(0x175),_0x1973aa(0x1a3),'25056BxaSTO','7191704fKnRVZ',_0x1973aa(0x19e),'2592MiDmNE',_0x1973aa(0x15f),_0x1973aa(0x1c3),_0x1973aa(0x16c),_0x1973aa(0x186),_0x1973aa(0x196),_0x1973aa(0x1b6),_0x1973aa(0x192),_0x1973aa(0x1a1),_0x1973aa(0x16a),_0x1973aa(0x17b),_0x1973aa(0x1b1),_0x1973aa(0x17f),_0x1973aa(0x149),'href',_0x1973aa(0x191),_0x1973aa(0x190),_0x1973aa(0x14f),_0x1973aa(0x1c2),_0x1973aa(0x159),_0x1973aa(0x14c),_0x1973aa(0x15c),_0x1973aa(0x17a),_0x1973aa(0x168),_0x1973aa(0x1a6),'complete',_0x1973aa(0x1a5),'7vbIFnD',_0x1973aa(0x18f),_0x1973aa(0x157),_0x1973aa(0x1a4),_0x1973aa(0x180),_0x1973aa(0x179),_0x1973aa(0x18d),'forEach',_0x1973aa(0x1ae),_0x1973aa(0x15b)];return _0x5eb9=function(){return _0x13eb0d;},_0x5eb9();}async function facebook(_0x26c958){return new Promise(async(_0x12443d,_0x4d1ece)=>{const _0x2518f9=_0x3ef6,_0x4fb661=_0x48e2;let _0x4da60e={'url':_0x26c958};axios(_0x4fb661(0xa5),{'method':_0x4fb661(0xba),'data':new URLSearchParams(Object[_0x4fb661(0xed)](_0x4da60e)),'headers':{'content-type':_0x4fb661(0xb5),'user-agent':_0x2518f9(0x233),'cookie':_0x4fb661(0x84)}})[_0x4fb661(0xe2)](async({data:_0x222448})=>{const _0x76680f=_0x2518f9,_0x57875c=_0x4fb661,_0x33e5cd=cheerio[_0x57875c(0xd8)](_0x222448);_0x12443d({'status':!![],'author':_0x76680f(0x214),'result':{'low':_0x33e5cd(_0x57875c(0xbe))[_0x57875c(0xe0)](_0x76680f(0x248)),'high':_0x33e5cd(_0x57875c(0xbe))['attr'](_0x57875c(0xf7)),'audio':_0x33e5cd(_0x57875c(0xc1))[_0x76680f(0x211)](_0x57875c(0xf7))}});})[_0x4fb661(0xf1)](_0x4d1ece);});}function _0xc4bb(_0x3d4fb1,_0xc16cdd){const _0x2ec7fa=_0x2ec7();return _0xc4bb=function(_0xc4bb25,_0x55a90e){_0xc4bb25=_0xc4bb25-0x149;let _0x3baff9=_0x2ec7fa[_0xc4bb25];return _0x3baff9;},_0xc4bb(_0x3d4fb1,_0xc16cdd);}async function mediafire(_0xeff357){return new Promise(async(_0x1109e0,_0x2fae80)=>{const _0x3b308a=_0xc4bb,_0x16aca6=_0x3ef6,_0x19303b=_0x48e2;try{const _0xdaff84=await axios(''+_0xeff357,{'method':_0x19303b(0xb7)}),_0x2da21e=cheerio[_0x19303b(0xd8)](_0xdaff84[_0x19303b(0xfd)]),_0x183ed2=_0x2da21e(_0x19303b(0xa2))[_0x19303b(0xe0)](_0x19303b(0xf7)),_0x3a2b23=_0x2da21e(_0x16aca6(0x1e2))[_0x19303b(0xcb)]()[_0x19303b(0xf0)](_0x19303b(0xb3),'')[_0x19303b(0xf0)]('(','')[_0x19303b(0xf0)](')','')[_0x19303b(0xf0)]('\x0a','')[_0x19303b(0xf0)]('\x0a','')[_0x16aca6(0x1f3)]('','')[_0x19303b(0xd0)](),_0x2c5e5c=_0x183ed2[_0x19303b(0xc5)]('/')[0x5][_0x19303b(0xc5)]('.')[_0x19303b(0x97)]()[_0x19303b(0x99)](0x1)[_0x19303b(0x97)]()[_0x16aca6(0x23c)]('.'),_0x4190bc=_0x183ed2[_0x19303b(0xc5)]('/')[0x5]['split']('.')[_0x16aca6(0x204)]()[_0x3b308a(0x1bd)]('.',0x1);_0x1109e0({'status':!![],'author':_0x19303b(0xfa),'result':{'title':_0x2c5e5c,'size':_0x3a2b23,'ext':_0x4190bc,'url':_0x183ed2}});}catch(_0x51485e){_0x2fae80({'status':![],'author':_0x19303b(0xfa),'error':new Error(_0x51485e)[_0x3b308a(0x18a)]});}});}function _0x48e2(_0x2bd587,_0x7519dc){const _0x207b56=_0x2276();return _0x48e2=function(_0x8a17fa,_0x3fe5a1){_0x8a17fa=_0x8a17fa-0x82;let _0x2203c5=_0x207b56[_0x8a17fa];return _0x2203c5;},_0x48e2(_0x2bd587,_0x7519dc);}async function twitter(_0x54ef2b){return new Promise(async(_0x3d4986,_0x3922e7)=>{const _0x4ab541=_0x48e2;let _0x56edb6={'URL':_0x54ef2b};axios[_0x4ab541(0xec)](_0x4ab541(0xc7),qs[_0x4ab541(0x8c)](_0x56edb6),{'headers':{'accept':_0x4ab541(0xb9),'sec-ch-ua':_0x4ab541(0xc8),'user-agent':_0x4ab541(0xa7),'cookie':_0x4ab541(0xe9)}})[_0x4ab541(0xe2)](({data:_0x507618})=>{const _0x3d8b78=_0x3ef6,_0x4957ee=_0x4ab541,_0x4c4094=cheerio[_0x4957ee(0xd8)](_0x507618);_0x3d4986({'author':_0x3d8b78(0x214),'result':{'desc':_0x4c4094('div:nth-child(1)\x20>\x20div:nth-child(2)\x20>\x20p')[_0x4957ee(0xcb)]()[_0x4957ee(0xd0)](),'thumb':_0x4c4094(_0x4957ee(0xd2))[_0x4957ee(0xe0)](_0x4957ee(0x8a)),'low':_0x4c4094(_0x4957ee(0xc9))[_0x4957ee(0xe0)](_0x3d8b78(0x248)),'high':_0x4c4094(_0x3d8b78(0x208))[_0x4957ee(0xe0)](_0x3d8b78(0x248)),'audio':_0x3d8b78(0x227)+_0x4c4094(_0x4957ee(0xe8))[_0x4957ee(0xe0)](_0x4957ee(0xf7))}});})[_0x4ab541(0xf1)](_0x3922e7);});}async function videy(_0x582809){return new Promise(async(_0x57f184,_0x5a058c)=>{const _0x5359e7=_0xc4bb,_0x1df661=_0x3ef6,_0x485497=_0x48e2,_0x2c39fa=await axios(''+_0x582809,{'method':_0x485497(0xb7)}),_0x63d77b=cheerio[_0x5359e7(0x17f)](_0x2c39fa[_0x485497(0xfd)]);let _0x564780={'status':!![],'author':_0x485497(0xfa),'result':{'media':_0x63d77b(_0x485497(0xb6))[_0x485497(0xe0)](_0x1df661(0x1f1))}};_0x57f184(_0x564780);});}module[_0xaed99b(0xe6)]={'tiktok':tiktok,'spotify':spotify,'instagram':instagram,'joox':joox,'xnxx':xnxx,'facebook':facebook,'mediafire':mediafire,'twitter':twitter,'videy':videy};