Update index.js
Browse files
index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
const express = require("express");
|
| 2 |
-
const { notube, tiktok, instagram, threads } = require('./lib/yt.js');
|
| 3 |
|
| 4 |
const app = express();
|
| 5 |
app.use(express.json());
|
|
@@ -12,7 +12,7 @@ app.all('/dl/start', async (req, res) => {
|
|
| 12 |
const ytr = await notube(url, typeYT, 'id', 'false');
|
| 13 |
res.json({ status: true, ...ytr });
|
| 14 |
} else if(/^https?:\/\/(?:www\.)?(?:twitter|x)\.com\/(?:i\/web\/status|[^\/]+\/status)\/(\d+)/.test(url)) {
|
| 15 |
-
const xr = await
|
| 16 |
res.json({ status: true, ...xr });
|
| 17 |
} else if(/^https?:\/\/(?:www\.)?(?:tiktok\.com\/(?:@[^\/]+\/video|t)\/|vt\.tiktok\.com\/)([a-zA-Z0-9]+)/.test(url)) {
|
| 18 |
const ttr = await tiktok(url);
|
|
|
|
| 1 |
const express = require("express");
|
| 2 |
+
const { notube, tiktok, instagram, threads, twitter } = require('./lib/yt.js');
|
| 3 |
|
| 4 |
const app = express();
|
| 5 |
app.use(express.json());
|
|
|
|
| 12 |
const ytr = await notube(url, typeYT, 'id', 'false');
|
| 13 |
res.json({ status: true, ...ytr });
|
| 14 |
} else if(/^https?:\/\/(?:www\.)?(?:twitter|x)\.com\/(?:i\/web\/status|[^\/]+\/status)\/(\d+)/.test(url)) {
|
| 15 |
+
const xr = await twitter(url);
|
| 16 |
res.json({ status: true, ...xr });
|
| 17 |
} else if(/^https?:\/\/(?:www\.)?(?:tiktok\.com\/(?:@[^\/]+\/video|t)\/|vt\.tiktok\.com\/)([a-zA-Z0-9]+)/.test(url)) {
|
| 18 |
const ttr = await tiktok(url);
|