xtsea commited on
Commit
4ee42cd
·
1 Parent(s): b567553
Files changed (3) hide show
  1. lib/all.js +6 -1
  2. package.json +1 -0
  3. plugins/alldownloader.js +11 -0
lib/all.js CHANGED
@@ -20,7 +20,7 @@ import * as xpro from 'xnxx-scraper';
20
  import * as happykntl from 'happy-dl';
21
 
22
  import { igdl } from 'ruhend-scraper'
23
-
24
  import fs from "fs";
25
  import * as uuid from 'uuid';
26
 
@@ -34,6 +34,10 @@ import {
34
 
35
  import { trbtoken, trburl } from '../config.js';
36
 
 
 
 
 
37
  async function audioContent(url) {
38
  const filePath = `${uuid.v4()}.mp3`;
39
  try {
@@ -147,4 +151,5 @@ export {
147
  XInfoDownloaderV2,
148
  TelegramUseLog,
149
  audioContent,
 
150
  };
 
20
  import * as happykntl from 'happy-dl';
21
 
22
  import { igdl } from 'ruhend-scraper'
23
+ import * as fbkntl from "another-fb-video-downloader";
24
  import fs from "fs";
25
  import * as uuid from 'uuid';
26
 
 
34
 
35
  import { trbtoken, trburl } from '../config.js';
36
 
37
+ async function FBDownloaderV2() {
38
+ console.log(fbkntl);
39
+ }
40
+
41
  async function audioContent(url) {
42
  const filePath = `${uuid.v4()}.mp3`;
43
  try {
 
151
  XInfoDownloaderV2,
152
  TelegramUseLog,
153
  audioContent,
154
+ FBDownloaderV2,
155
  };
package.json CHANGED
@@ -18,6 +18,7 @@
18
  "akenoaijs": "1.2.1-dev1",
19
  "gifted-dls": "*",
20
  "buffer": "*",
 
21
  "happy-dl": "*",
22
  "mongoose": "*",
23
  "multer": "*",
 
18
  "akenoaijs": "1.2.1-dev1",
19
  "gifted-dls": "*",
20
  "buffer": "*",
21
+ "another-fb-video-downloader": "*",
22
  "happy-dl": "*",
23
  "mongoose": "*",
24
  "multer": "*",
plugins/alldownloader.js CHANGED
@@ -25,6 +25,7 @@ import {
25
  XInfoDownloaderV2,
26
  SeachTiktok,
27
  TelegramUseLog,
 
28
  } from '../lib/all.js';
29
 
30
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
@@ -61,6 +62,16 @@ async function downloadMedia(media) {
61
  }
62
  }
63
 
 
 
 
 
 
 
 
 
 
 
64
  /**
65
  * @swagger
66
  * /api/v1/dl/xnxx-info-v2:
 
25
  XInfoDownloaderV2,
26
  SeachTiktok,
27
  TelegramUseLog,
28
+ FBDownloaderV2,
29
  } from '../lib/all.js';
30
 
31
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
 
62
  }
63
  }
64
 
65
+
66
+ AllDlRoutes.get('/api/v1/dl/fb-v2', async (req, res) => {
67
+ try {
68
+ await FBDownloaderV2();
69
+ res.json({ ok: "true" });
70
+ } catch (error) {
71
+ res.status(500).json({ error: error.message });
72
+ }
73
+ });
74
+
75
  /**
76
  * @swagger
77
  * /api/v1/dl/xnxx-info-v2: