CTK-WARRIOR / ctk-anime-scraper

scraper to scrap anime from gogoanime
12 stars 2 forks source link

[Feature Request] get the anime data when searching anime. #7

Open choppymaster opened 3 years ago

choppymaster commented 3 years ago

The search function allows to get the title, link, image and release date. It would be nice if you add a data object with these response. So the returning main object would include another object that includes other anime info like description, genre, type etc. Thanks.

LegendaryEmoji commented 3 years ago

Hello, choppymaster 👋

TL;DR

Description

Why (Fetching process)

For getting additional properties (description, genre, etc), scraper will have to fetch entire anime page, search method returns url property, scraper will have to send another GET request to anime url & then convert it to textContent, cheerio (npm pkg for making scraping work easier) will load all text content from anime url & get our additional properties, after that all it will make all raw content from cheerio into textContent.

Solution / Idea

choppymaster commented 3 years ago

Good idea.

ItzYuzuruYT commented 3 years ago

Tru, the delay would really increase when loading multiple pages. You can instead use search and store the anime link in a var then use fetchAnime to fetch the data from that link. It'd be the same process