update
Browse files- lib/all.js +7 -0
- plugins/alldownloader.js +25 -0
lib/all.js
CHANGED
@@ -116,6 +116,12 @@ async function XInfoDownloaderV2(url) {
|
|
116 |
return CreatorOriginal(data);
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
export {
|
120 |
facebookdl,
|
121 |
savefrom,
|
@@ -147,4 +153,5 @@ export {
|
|
147 |
XInfoDownloaderV2,
|
148 |
TelegramUseLog,
|
149 |
audioContent,
|
|
|
150 |
};
|
|
|
116 |
return CreatorOriginal(data);
|
117 |
}
|
118 |
|
119 |
+
function generateRandomTimestamp() {
|
120 |
+
const start = new Date("2023-01-01").getTime();
|
121 |
+
const end = new Date("2026-12-31").getTime();
|
122 |
+
return Math.floor(Math.random() * (end - start) + start);
|
123 |
+
}
|
124 |
+
|
125 |
export {
|
126 |
facebookdl,
|
127 |
savefrom,
|
|
|
153 |
XInfoDownloaderV2,
|
154 |
TelegramUseLog,
|
155 |
audioContent,
|
156 |
+
generateRandomTimestamp,
|
157 |
};
|
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,30 @@ async function downloadMedia(media) {
|
|
61 |
}
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* @swagger
|
66 |
* /api/v1/dl/xnxx-info-v2:
|
|
|
25 |
XInfoDownloaderV2,
|
26 |
SeachTiktok,
|
27 |
TelegramUseLog,
|
28 |
+
generateRandomTimestamp,
|
29 |
} from '../lib/all.js';
|
30 |
|
31 |
import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
|
|
|
62 |
}
|
63 |
}
|
64 |
|
65 |
+
AllDlRoutes.post("/api/v1/dl/savefrom-convert", async (req, res) => {
|
66 |
+
try {
|
67 |
+
const url = "https://api.savefrom.app/api/convert";
|
68 |
+
const payload = {
|
69 |
+
url: req.body.url || "https://youtu.be/HLawSES6NFo?si=mKcd9mRSl0XsSQyf",
|
70 |
+
ts: generateRandomTimestamp(),
|
71 |
+
_ts: generateRandomTimestamp(),
|
72 |
+
_tsc: 0,
|
73 |
+
_s: "01294d25173ed7832afaa74997b4c52579ac7fb4a4f98c7a115f44336a084c10"
|
74 |
+
};
|
75 |
+
|
76 |
+
const response = await got.post(url, {
|
77 |
+
json: payload,
|
78 |
+
responseType: "json"
|
79 |
+
});
|
80 |
+
|
81 |
+
res.json(response.body);
|
82 |
+
} catch (error) {
|
83 |
+
res.status(500).json({ error: error.message });
|
84 |
+
}
|
85 |
+
});
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
/**
|
90 |
* @swagger
|
91 |
* /api/v1/dl/xnxx-info-v2:
|