|
|
|
@ -15,13 +15,12 @@ const animeflvInfo = async (id, index) => {
|
|
|
|
|
let debut = ""
|
|
|
|
|
let type = ""
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
const res = await cloudscraper(`${BASE_ANIMEFLV}anime/${id}`);
|
|
|
|
|
const body = await res;
|
|
|
|
|
const $ = cheerio.load(body);
|
|
|
|
|
|
|
|
|
|
const $ = await cheerio.load(body);
|
|
|
|
|
const scripts = $('script');
|
|
|
|
|
const anime_info_ids = [];
|
|
|
|
|
const anime_eps_data = [];
|
|
|
|
@ -107,9 +106,6 @@ const animeflvInfo = async (id, index) => {
|
|
|
|
|
console.error(err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} while (poster === "" && banner === "" && synopsis === "" && rating === "" && debut === "" && type === "")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const getAnimeCharacters = async (title) => {
|
|
|
|
@ -268,7 +264,7 @@ const searchAnime = async (query) => {
|
|
|
|
|
|
|
|
|
|
const res = await cloudscraper(`${SEARCH_URL}${query}`);
|
|
|
|
|
const body = await res;
|
|
|
|
|
const $ = cheerio.load(body);
|
|
|
|
|
const $ = await cheerio.load(body);
|
|
|
|
|
const promises = [];
|
|
|
|
|
|
|
|
|
|
$('div.Container ul.ListAnimes li article').each((index, element) => {
|
|
|
|
@ -340,7 +336,7 @@ const obtainPreviewNews = (encoded) => {
|
|
|
|
|
.substring(10).replace("http", "https")
|
|
|
|
|
.replace("httpss", "https")
|
|
|
|
|
} else if (encoded.includes('<img')) {
|
|
|
|
|
image = encoded.split("src=")[1].split(" class=")[0].replace("\"", '').replace('\"','')
|
|
|
|
|
image = encoded.split("src=")[1].split(" class=")[0].replace("\"", '').replace('\"', '')
|
|
|
|
|
} else if (encoded.includes('https://www.youtube.com/embed/')) {
|
|
|
|
|
let getSecondThumb = encoded.split('https://www.youtube.com/embed/')[1].split('?feature')[0]
|
|
|
|
|
image = `https://img.youtube.com/vi/${getSecondThumb}/0.jpg`
|
|
|
|
@ -364,7 +360,7 @@ const structureThemes = async (body, indv, task) => {
|
|
|
|
|
let respFinal
|
|
|
|
|
|
|
|
|
|
if (task === 0) {
|
|
|
|
|
for(let i = 0; i <= body.length -1; i++) {
|
|
|
|
|
for (let i = 0; i <= body.length - 1; i++) {
|
|
|
|
|
|
|
|
|
|
if (indv === true) {
|
|
|
|
|
const data = await cloudscraper.get(`${BASE_THEMEMOE}themes/${body[i]}`);
|
|
|
|
@ -420,7 +416,7 @@ const getHeaderTheme = async (series) => {
|
|
|
|
|
let promises = []
|
|
|
|
|
let data
|
|
|
|
|
|
|
|
|
|
for(let i = 0; i <= series.length -1; i++) {
|
|
|
|
|
for (let i = 0; i <= series.length - 1; i++) {
|
|
|
|
|
|
|
|
|
|
data = await getThemes(series[i].themes)
|
|
|
|
|
|
|
|
|
|