Update lib/scrapper.js
Browse files- lib/scrapper.js +14 -1
lib/scrapper.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import axios from 'axios';
|
2 |
import * as cheerio from 'cheerio';
|
|
|
3 |
|
4 |
import {GptModelOld} from '../models.js';
|
5 |
|
@@ -19,6 +20,17 @@ const AuthorOriginal = function (response) {
|
|
19 |
}
|
20 |
};
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
const Copilot2Trip = async (query) => {
|
23 |
try {
|
24 |
const url = ParametersUrl("ai/copilot2trip");
|
@@ -167,5 +179,6 @@ export {
|
|
167 |
AnimeHentai,
|
168 |
GempaBumi,
|
169 |
Copilot2Trip,
|
170 |
-
ParametersUrl
|
|
|
171 |
};
|
|
|
1 |
import axios from 'axios';
|
2 |
import * as cheerio from 'cheerio';
|
3 |
+
import * as config from '../config.js';
|
4 |
|
5 |
import {GptModelOld} from '../models.js';
|
6 |
|
|
|
20 |
}
|
21 |
};
|
22 |
|
23 |
+
const TiktokDownloader = async (url) => {
|
24 |
+
try {
|
25 |
+
const urls = `${config.TIKTOK_URL}/api/?url=${url}`;
|
26 |
+
const response = await axios.get(url);
|
27 |
+
return response.data;
|
28 |
+
} catch (error) {
|
29 |
+
console.error("Error:", e.message);
|
30 |
+
return null;
|
31 |
+
}
|
32 |
+
};
|
33 |
+
|
34 |
const Copilot2Trip = async (query) => {
|
35 |
try {
|
36 |
const url = ParametersUrl("ai/copilot2trip");
|
|
|
179 |
AnimeHentai,
|
180 |
GempaBumi,
|
181 |
Copilot2Trip,
|
182 |
+
ParametersUrl,
|
183 |
+
TiktokDownloader
|
184 |
};
|