fix update
Browse files- lib/all.js +4 -3
- plugins/alldownloader.js +3 -2
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 |
-
import * as
|
24 |
import fs from "fs";
|
25 |
import * as uuid from 'uuid';
|
26 |
|
@@ -34,8 +34,9 @@ import {
|
|
34 |
|
35 |
import { trbtoken, trburl } from '../config.js';
|
36 |
|
37 |
-
async function FBDownloaderV2() {
|
38 |
-
|
|
|
39 |
}
|
40 |
|
41 |
async function audioContent(url) {
|
|
|
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(url) {
|
38 |
+
const result = fbkntl.default.facebook(url);
|
39 |
+
return result;
|
40 |
}
|
41 |
|
42 |
async function audioContent(url) {
|
plugins/alldownloader.js
CHANGED
@@ -65,8 +65,9 @@ async function downloadMedia(media) {
|
|
65 |
|
66 |
AllDlRoutes.get('/api/v1/dl/fb-v2', async (req, res) => {
|
67 |
try {
|
68 |
-
|
69 |
-
|
|
|
70 |
} catch (error) {
|
71 |
res.status(500).json({ error: error.message });
|
72 |
}
|
|
|
65 |
|
66 |
AllDlRoutes.get('/api/v1/dl/fb-v2', async (req, res) => {
|
67 |
try {
|
68 |
+
const q = req.query.url;
|
69 |
+
const results = FBDownloaderV2(q);
|
70 |
+
res.json(results);
|
71 |
} catch (error) {
|
72 |
res.status(500).json({ error: error.message });
|
73 |
}
|