Update lib/scrapper.js
Browse files- lib/scrapper.js +3 -3
lib/scrapper.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import axios from 'axios';
|
2 |
-
import * as
|
3 |
import * as config from '../config.js';
|
4 |
import xnxx from "xnxx-dl";
|
5 |
import { savefrom } from '@bochilteam/scraper';
|
@@ -150,7 +150,7 @@ async function tebakgambar() {
|
|
150 |
try {
|
151 |
const url = await RendyDevX()
|
152 |
const response = await axios.get(url);
|
153 |
-
const $ =
|
154 |
|
155 |
const randomNum = Math.floor(Math.random() * (2836 - 2 + 1)) + 2; // Random between 2 and 2836
|
156 |
const selectedItem = $(`#images > li:nth-child(${randomNum}) > a`);
|
@@ -180,7 +180,7 @@ async function AnimeHentai() {
|
|
180 |
const page = Math.floor(Math.random() * 1153) + 1;
|
181 |
const url = `https://sfmcompile.club/page/${page}`;
|
182 |
const response = await axios.get(url);
|
183 |
-
const $ =
|
184 |
|
185 |
const hasil = [];
|
186 |
const articles = $('#primary > div > div > ul > li > article');
|
|
|
1 |
import axios from 'axios';
|
2 |
+
import * as cheerio from 'cheerio';
|
3 |
import * as config from '../config.js';
|
4 |
import xnxx from "xnxx-dl";
|
5 |
import { savefrom } from '@bochilteam/scraper';
|
|
|
150 |
try {
|
151 |
const url = await RendyDevX()
|
152 |
const response = await axios.get(url);
|
153 |
+
const $ = cheerio.load(response.data);
|
154 |
|
155 |
const randomNum = Math.floor(Math.random() * (2836 - 2 + 1)) + 2; // Random between 2 and 2836
|
156 |
const selectedItem = $(`#images > li:nth-child(${randomNum}) > a`);
|
|
|
180 |
const page = Math.floor(Math.random() * 1153) + 1;
|
181 |
const url = `https://sfmcompile.club/page/${page}`;
|
182 |
const response = await axios.get(url);
|
183 |
+
const $ = cheerio.load(response.data);
|
184 |
|
185 |
const hasil = [];
|
186 |
const articles = $('#primary > div > div > ul > li > article');
|