randydev commited on
Commit
7b81241
·
1 Parent(s): 534daf5
Files changed (2) hide show
  1. lib/all.js +0 -30
  2. plugins/alldownloader.js +0 -82
lib/all.js CHANGED
@@ -136,34 +136,6 @@ async function TwitterDownloaderV2(url) {
136
  }
137
  }
138
 
139
- async function YTDLDownloaderV2(url) {
140
- try {
141
- const result = await lubacotscaper.default.ytdl(url);
142
- if (typeof result === "object") {
143
- result.owner = "xtdevs";
144
- delete result.issues;
145
- return result;
146
- }
147
- } catch (error) {
148
- console.error("Error fetching data:", error.message);
149
- return null;
150
- }
151
- }
152
-
153
- async function FBDownloaderV2(url) {
154
- try {
155
- const result = await lubacotscaper.default.fbdlV2(url);
156
- if (typeof result === "object") {
157
- result.owner = "xtdevs";
158
- delete result.issues;
159
- return result;
160
- }
161
- } catch (error) {
162
- console.error("Error fetching data:", error.message);
163
- return null;
164
- }
165
- }
166
-
167
  export {
168
  facebookdl,
169
  savefrom,
@@ -197,6 +169,4 @@ export {
197
  audioContent,
198
  generateRandomTimestamp,
199
  TwitterDownloaderV2,
200
- YTDLDownloaderV2,
201
- FBDownloaderV2,
202
  };
 
136
  }
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  export {
140
  facebookdl,
141
  savefrom,
 
169
  audioContent,
170
  generateRandomTimestamp,
171
  TwitterDownloaderV2,
 
 
172
  };
plugins/alldownloader.js CHANGED
@@ -26,8 +26,6 @@ import {
26
  SeachTiktok,
27
  TelegramUseLog,
28
  TwitterDownloaderV2,
29
- YTDLDownloaderV2,
30
- FBDownloaderV2,
31
  } from '../lib/all.js';
32
 
33
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
@@ -64,86 +62,6 @@ async function downloadMedia(media) {
64
  }
65
  }
66
 
67
- /**
68
- * @swagger
69
- * /api/v1/dl/fb-v2:
70
- * get:
71
- * summary: Facebook V2 Downloader
72
- * tags: [ALL-Downloader]
73
- * parameters:
74
- * - in: query
75
- * name: url
76
- * required: true
77
- * description: null
78
- * schema:
79
- * type: string
80
- * - in: header
81
- * name: x-api-key
82
- * required: true
83
- * description: API key for authentication
84
- * schema:
85
- * type: string
86
- * responses:
87
- * 200:
88
- * description: Success
89
- * 400:
90
- * description: Bad Request (e.g., missing or invalid URL)
91
- * 401:
92
- * description: Unauthorized (e.g., missing or invalid API key)
93
- * 500:
94
- * description: Internal Server Error
95
- */
96
- AllDlRoutes.get('/api/v1/dl/fb-v2', async (req, res) => {
97
- try {
98
- const q = req.query.url;
99
- const results = await FBDownloaderV2(q);
100
- res.json({ message: results });
101
- } catch (error) {
102
- res.status(500).json({ error: error.message });
103
- }
104
- });
105
-
106
-
107
- /**
108
- * @swagger
109
- * /api/v1/dl/ytdl-v2:
110
- * get:
111
- * summary: Youtube V2 Downloader
112
- * tags: [ALL-Downloader]
113
- * parameters:
114
- * - in: query
115
- * name: url
116
- * required: true
117
- * description: null
118
- * schema:
119
- * type: string
120
- * - in: header
121
- * name: x-api-key
122
- * required: true
123
- * description: API key for authentication
124
- * schema:
125
- * type: string
126
- * responses:
127
- * 200:
128
- * description: Success
129
- * 400:
130
- * description: Bad Request (e.g., missing or invalid URL)
131
- * 401:
132
- * description: Unauthorized (e.g., missing or invalid API key)
133
- * 500:
134
- * description: Internal Server Error
135
- */
136
- AllDlRoutes.get('/api/v1/dl/ytdl-v2', async (req, res) => {
137
- try {
138
- const q = req.query.url;
139
- const results = await YTDLDownloaderV2(q);
140
- res.json({ message: results });
141
- } catch (error) {
142
- res.status(500).json({ error: error.message });
143
- }
144
- });
145
-
146
-
147
  /**
148
  * @swagger
149
  * /api/v1/dl/twitter-v2:
 
26
  SeachTiktok,
27
  TelegramUseLog,
28
  TwitterDownloaderV2,
 
 
29
  } from '../lib/all.js';
30
 
31
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
 
62
  }
63
  }
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  /**
66
  * @swagger
67
  * /api/v1/dl/twitter-v2: