Fixes to MoreInfo

pull/1/head
Jéluchu 5 years ago
parent 1578c02352
commit 88d2838949

@ -15,13 +15,12 @@ const animeflvInfo = async (id, index) => {
let debut = "" let debut = ""
let type = "" let type = ""
do {
try { try {
const res = await cloudscraper(`${BASE_ANIMEFLV}anime/${id}`); const res = await cloudscraper(`${BASE_ANIMEFLV}anime/${id}`);
const body = await res; const body = await res;
const $ = cheerio.load(body);
const $ = await cheerio.load(body);
const scripts = $('script'); const scripts = $('script');
const anime_info_ids = []; const anime_info_ids = [];
const anime_eps_data = []; const anime_eps_data = [];
@ -107,9 +106,6 @@ const animeflvInfo = async (id, index) => {
console.error(err) console.error(err)
} }
} while (poster === "" && banner === "" && synopsis === "" && rating === "" && debut === "" && type === "")
}; };
const getAnimeCharacters = async (title) => { const getAnimeCharacters = async (title) => {
@ -268,7 +264,7 @@ const searchAnime = async (query) => {
const res = await cloudscraper(`${SEARCH_URL}${query}`); const res = await cloudscraper(`${SEARCH_URL}${query}`);
const body = await res; const body = await res;
const $ = cheerio.load(body); const $ = await cheerio.load(body);
const promises = []; const promises = [];
$('div.Container ul.ListAnimes li article').each((index, element) => { $('div.Container ul.ListAnimes li article').each((index, element) => {

Loading…
Cancel
Save