ok
Browse files- lib/all.js +13 -13
- package.json +1 -0
- plugins/alldownloader.js +7 -6
lib/all.js
CHANGED
@@ -21,7 +21,7 @@ import * as happykntl from 'happy-dl';
|
|
21 |
import * as lubacotscaper from "scraper-sosmed";
|
22 |
|
23 |
import { igdl } from 'ruhend-scraper';
|
24 |
-
import
|
25 |
import fs from "fs";
|
26 |
import * as uuid from 'uuid';
|
27 |
|
@@ -48,6 +48,17 @@ async function audioContent(url) {
|
|
48 |
}
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
async function InstagramDLV2(url) {
|
52 |
try {
|
53 |
const data = await igdlv2.instagramGetUrl(url);
|
@@ -81,17 +92,6 @@ async function TelegramUseLog(user_id, api_key, text_log) {
|
|
81 |
}
|
82 |
}
|
83 |
|
84 |
-
async function YTBmp4(url) {
|
85 |
-
try {
|
86 |
-
const data = await ytmp4(url);
|
87 |
-
console.log(data);
|
88 |
-
return data;
|
89 |
-
} catch (err) {
|
90 |
-
console.error(err);
|
91 |
-
return null;
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
async function InstagramDLV3(url) {
|
96 |
try {
|
97 |
const data = await igdl(url);
|
@@ -161,10 +161,10 @@ export {
|
|
161 |
capcutdl,
|
162 |
trbtoken,
|
163 |
trburl,
|
|
|
164 |
twitterdl,
|
165 |
PinterestDL,
|
166 |
SeachTiktok,
|
167 |
-
YTBmp4,
|
168 |
sfilemobiSearch,
|
169 |
XnxxDownloader,
|
170 |
TiktokDownloader,
|
|
|
21 |
import * as lubacotscaper from "scraper-sosmed";
|
22 |
|
23 |
import { igdl } from 'ruhend-scraper';
|
24 |
+
import * as scraperanjing from '@saipulanuar/scraper';
|
25 |
import fs from "fs";
|
26 |
import * as uuid from 'uuid';
|
27 |
|
|
|
48 |
}
|
49 |
}
|
50 |
|
51 |
+
async function CheckScaper(url) {
|
52 |
+
try {
|
53 |
+
console.log(scraperanjing);
|
54 |
+
return {"message": "ok"};
|
55 |
+
} catch (err) {
|
56 |
+
console.error(err);
|
57 |
+
return null;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
async function InstagramDLV2(url) {
|
63 |
try {
|
64 |
const data = await igdlv2.instagramGetUrl(url);
|
|
|
92 |
}
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
async function InstagramDLV3(url) {
|
96 |
try {
|
97 |
const data = await igdl(url);
|
|
|
161 |
capcutdl,
|
162 |
trbtoken,
|
163 |
trburl,
|
164 |
+
CheckScaper,
|
165 |
twitterdl,
|
166 |
PinterestDL,
|
167 |
SeachTiktok,
|
|
|
168 |
sfilemobiSearch,
|
169 |
XnxxDownloader,
|
170 |
TiktokDownloader,
|
package.json
CHANGED
@@ -20,6 +20,7 @@
|
|
20 |
"buffer": "*",
|
21 |
"another-fb-video-downloader": "*",
|
22 |
"scraper-sosmed": "*",
|
|
|
23 |
"happy-dl": "*",
|
24 |
"mongoose": "*",
|
25 |
"multer": "*",
|
|
|
20 |
"buffer": "*",
|
21 |
"another-fb-video-downloader": "*",
|
22 |
"scraper-sosmed": "*",
|
23 |
+
"@saipulanuar/scraper": "*",
|
24 |
"happy-dl": "*",
|
25 |
"mongoose": "*",
|
26 |
"multer": "*",
|
plugins/alldownloader.js
CHANGED
@@ -26,7 +26,7 @@ import {
|
|
26 |
SeachTiktok,
|
27 |
TelegramUseLog,
|
28 |
TwitterDownloaderV2,
|
29 |
-
|
30 |
} from '../lib/all.js';
|
31 |
|
32 |
import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
|
@@ -65,14 +65,14 @@ async function downloadMedia(media) {
|
|
65 |
|
66 |
/**
|
67 |
* @swagger
|
68 |
-
* /api/v1/dl/
|
69 |
* get:
|
70 |
-
* summary:
|
71 |
* tags: [ALL-Downloader]
|
72 |
* parameters:
|
73 |
* - in: query
|
74 |
* name: url
|
75 |
-
* required:
|
76 |
* description: null
|
77 |
* schema:
|
78 |
* type: string
|
@@ -86,10 +86,10 @@ async function downloadMedia(media) {
|
|
86 |
* 500:
|
87 |
* description: Internal Server Error
|
88 |
*/
|
89 |
-
AllDlRoutes.get('/api/v1/dl/
|
90 |
try {
|
91 |
const q = req.query.url;
|
92 |
-
const results = await
|
93 |
res.json({ message: results });
|
94 |
} catch (error) {
|
95 |
res.status(500).json({ error: error.message });
|
@@ -97,6 +97,7 @@ AllDlRoutes.get('/api/v1/dl/ytmp4', async (req, res) => {
|
|
97 |
});
|
98 |
|
99 |
|
|
|
100 |
/**
|
101 |
* @swagger
|
102 |
* /api/v1/dl/twitter-v2:
|
|
|
26 |
SeachTiktok,
|
27 |
TelegramUseLog,
|
28 |
TwitterDownloaderV2,
|
29 |
+
CheckScaper,
|
30 |
} from '../lib/all.js';
|
31 |
|
32 |
import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
|
|
|
65 |
|
66 |
/**
|
67 |
* @swagger
|
68 |
+
* /api/v1/dl/check:
|
69 |
* get:
|
70 |
+
* summary: Check Downloader
|
71 |
* tags: [ALL-Downloader]
|
72 |
* parameters:
|
73 |
* - in: query
|
74 |
* name: url
|
75 |
+
* required: false
|
76 |
* description: null
|
77 |
* schema:
|
78 |
* type: string
|
|
|
86 |
* 500:
|
87 |
* description: Internal Server Error
|
88 |
*/
|
89 |
+
AllDlRoutes.get('/api/v1/dl/check', async (req, res) => {
|
90 |
try {
|
91 |
const q = req.query.url;
|
92 |
+
const results = await CheckScaper();
|
93 |
res.json({ message: results });
|
94 |
} catch (error) {
|
95 |
res.status(500).json({ error: error.message });
|
|
|
97 |
});
|
98 |
|
99 |
|
100 |
+
|
101 |
/**
|
102 |
* @swagger
|
103 |
* /api/v1/dl/twitter-v2:
|