update
Browse files- lib/all.js +13 -1
- plugins/alldownloader.js +35 -0
lib/all.js
CHANGED
@@ -20,7 +20,8 @@ import * as xpro from 'xnxx-scraper';
|
|
20 |
import * as happykntl from 'happy-dl';
|
21 |
import * as lubacotscaper from "scraper-sosmed";
|
22 |
|
23 |
-
import { igdl } from 'ruhend-scraper'
|
|
|
24 |
import fs from "fs";
|
25 |
import * as uuid from 'uuid';
|
26 |
|
@@ -80,6 +81,16 @@ async function TelegramUseLog(user_id, api_key, text_log) {
|
|
80 |
}
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
async function InstagramDLV3(url) {
|
85 |
try {
|
@@ -153,6 +164,7 @@ export {
|
|
153 |
twitterdl,
|
154 |
PinterestDL,
|
155 |
SeachTiktok,
|
|
|
156 |
sfilemobiSearch,
|
157 |
XnxxDownloader,
|
158 |
TiktokDownloader,
|
|
|
20 |
import * as happykntl from 'happy-dl';
|
21 |
import * as lubacotscaper from "scraper-sosmed";
|
22 |
|
23 |
+
import { igdl } from 'ruhend-scraper';
|
24 |
+
import { ytmp4 } from 'ruhend-scraper';
|
25 |
import fs from "fs";
|
26 |
import * as uuid from 'uuid';
|
27 |
|
|
|
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 {
|
|
|
164 |
twitterdl,
|
165 |
PinterestDL,
|
166 |
SeachTiktok,
|
167 |
+
YTBmp4,
|
168 |
sfilemobiSearch,
|
169 |
XnxxDownloader,
|
170 |
TiktokDownloader,
|
plugins/alldownloader.js
CHANGED
@@ -26,6 +26,7 @@ import {
|
|
26 |
SeachTiktok,
|
27 |
TelegramUseLog,
|
28 |
TwitterDownloaderV2,
|
|
|
29 |
} from '../lib/all.js';
|
30 |
|
31 |
import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
|
@@ -62,6 +63,40 @@ async function downloadMedia(media) {
|
|
62 |
}
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
/**
|
66 |
* @swagger
|
67 |
* /api/v1/dl/twitter-v2:
|
|
|
26 |
SeachTiktok,
|
27 |
TelegramUseLog,
|
28 |
TwitterDownloaderV2,
|
29 |
+
YTBmp4,
|
30 |
} from '../lib/all.js';
|
31 |
|
32 |
import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
|
|
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
/**
|
67 |
+
* @swagger
|
68 |
+
* /api/v1/dl/ytmp4:
|
69 |
+
* get:
|
70 |
+
* summary: YTmp4 Downloader
|
71 |
+
* tags: [ALL-Downloader]
|
72 |
+
* parameters:
|
73 |
+
* - in: query
|
74 |
+
* name: url
|
75 |
+
* required: true
|
76 |
+
* description: null
|
77 |
+
* schema:
|
78 |
+
* type: string
|
79 |
+
* responses:
|
80 |
+
* 200:
|
81 |
+
* description: Success
|
82 |
+
* 400:
|
83 |
+
* description: Bad Request (e.g., missing or invalid URL)
|
84 |
+
* 401:
|
85 |
+
* description: Unauthorized (e.g., missing or invalid API key)
|
86 |
+
* 500:
|
87 |
+
* description: Internal Server Error
|
88 |
+
*/
|
89 |
+
AllDlRoutes.get('/api/v1/dl/ytmp4', async (req, res) => {
|
90 |
+
try {
|
91 |
+
const q = req.query.url;
|
92 |
+
const results = await YTBmp4(q);
|
93 |
+
res.json({ message: results });
|
94 |
+
} catch (error) {
|
95 |
+
res.status(500).json({ error: error.message });
|
96 |
+
}
|
97 |
+
});
|
98 |
+
|
99 |
+
|
100 |
/**
|
101 |
* @swagger
|
102 |
* /api/v1/dl/twitter-v2:
|