Update scrapper.js
Browse files- scrapper.js +27 -1
scrapper.js
CHANGED
@@ -3,6 +3,28 @@ import * as cheerio from 'cheerio';
|
|
3 |
|
4 |
import {GptModelOld} from './models.js';
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
const OpenaiRes = async (prompt) => {
|
7 |
try {
|
8 |
const EncodeUrl = "aHR0cHM6Ly9vcGVuYWktZ3B0LnJlbWl4cHJvamVjdC5vcmcv"
|
@@ -119,4 +141,8 @@ async function AnimeHentai() {
|
|
119 |
}
|
120 |
}
|
121 |
|
122 |
-
export {
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
import {GptModelOld} from './models.js';
|
5 |
|
6 |
+
const ParametersUrl = function (parameters) {
|
7 |
+
const url = `https://itzpire.com/${parameters}`;
|
8 |
+
return url
|
9 |
+
};
|
10 |
+
|
11 |
+
const GempaBumi = async () => {
|
12 |
+
try {
|
13 |
+
const url = ParametersUrl("information/gempa-warning");
|
14 |
+
const response = await axios.get(url)
|
15 |
+
if (typeof response.data === "object") {
|
16 |
+
response.data.author = "xtdevs";
|
17 |
+
return response.data;
|
18 |
+
} else {
|
19 |
+
console.log("the return value was not a json object");
|
20 |
+
return null;
|
21 |
+
}
|
22 |
+
} catch (e) {
|
23 |
+
console.error("Error:", error.message);
|
24 |
+
return null;
|
25 |
+
}
|
26 |
+
};
|
27 |
+
|
28 |
const OpenaiRes = async (prompt) => {
|
29 |
try {
|
30 |
const EncodeUrl = "aHR0cHM6Ly9vcGVuYWktZ3B0LnJlbWl4cHJvamVjdC5vcmcv"
|
|
|
141 |
}
|
142 |
}
|
143 |
|
144 |
+
export {
|
145 |
+
OpenaiRes,
|
146 |
+
tebakgambar,
|
147 |
+
AnimeHentai
|
148 |
+
};
|