ghoshRitesh12 / aniwatch-api

Node.js API for obtaining anime information from hianime.to
https://api-aniwatch.onrender.com
MIT License
236 stars 133 forks source link

Sometimes The home route just gives empty data. #19

Closed JayadityaGit closed 9 months ago

JayadityaGit commented 9 months ago

Describe the bug

it is not able to fetch the data like trending etc , instead it just gives an empty array in the home route (This happening frequently, it is dissaperaing in the next reload).

Expected behavior

notbug

Actual behavior

bug

Additional context

The bug not appearing all the time, but it is becoming frequent....

ghoshRitesh12 commented 9 months ago

I will have this bug on hold for a while. If the array is empty a times then there maybe some other problem. If this becomes even more frequent then I'll try to resolve it. What do you say @JayadityaGit?

JayadityaGit commented 9 months ago

First of all thanks man for creating this api, my main motivation is to build an anime website, for that I learned web development (MERN) ,so coming to the question i really want to understand this web scraping can you suggest a resource so I can build my anime web scrapper. I know it is using cheerio and axios , but I feel overwhelmed looking at this codebase. Can you help me like giving a roadmap or something. I just want to have control over my scrapper for future issues.

Happy New year 🎊

ghoshRitesh12 commented 9 months ago

Happy New Year 🎊✨

Basically the code base feels overwhelming because it follows some principles of clean code, hence it's so much modularized. It's really easy to figure out, for every endpoint you send a req to aniwatch's endpoint grabbing the html and extracting the data via cheerio and sending back the json response. Basically that's how most endpoints work in this api.

Here's a resource that may help you understand web scraping

ghoshRitesh12 commented 9 months ago

@JayadityaGit I am closing this issue as not planned. If this issue worsens then do open another issue.

JayadityaGit commented 9 months ago

No problem, since the release of movie-web.app , I was awe struck by the possibilities, what a streaming platform can do...

Thx for guidance and the resource.

ghoshRitesh12 commented 9 months ago

@JayadityaGit anytime.