-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Character info search #90
Comments
This feature is completely possible if you are wondering.
You could modify the function to add support for // New usage:
scraper.getInfoFromName(query, getBestMatch=true, type="anime");
scraper.getInfoFromName("Spy x Family");
// -> Using https://myanimelist.net/search/prefix.json?type=anime&keyword=Spy+x+Family
// -> If no type is provided, it would use `anime` as type by default.
scraper.getInfoFromName("Spy x Family", true, "anime");
// -> Using https://myanimelist.net/search/prefix.json?type=anime&keyword=Spy+x+Family
// -> If type is provided, it would use the provided type.
scraper.getInfoFromName("Forger", true, "character");
// -> Using https://myanimelist.net/search/prefix.json?type=character&keyword=Forger
// -> If type is provided, it would use the provided type. Honestly, this whole type thing is a bit flawed, but without it, searching would become really difficult as most of the people only need anime results. I would've made a PR (Pull Request) but seeing how the main developer is inactive, I doubt that it would get merged anytime soon. |
@LegendaryEmoji If you have the code ready then please make a PR. Kylart is not inactive on GitHub, he will see it anytime soon. I will also work on an implementation and we can discuss them in the PR. |
I don't have the code ready yet. The reason is simple, if we decided to add character searching, we would also need to add parsing for the raw character HTML page and so on. This isn't a simple function change if you want detailed information. I would need some time (e.g. 3-5 days) to code this feature. I will definitely need help regarding TypeScript typing so you can help me in that in the pull request (@StavrosNik4). |
You have two solutions if you're willing to make a PR and are unsure it will get merge because of an inactive maintainer:
In the meantime, I greatly appreciate your contributions even though I don't have that much time to take care of these projects! |
This would take a little longer. I am planning to add more things other than this single thing. I'll keep you updated. |
@Kylart would it be fine if I make major changes like changes which will break the package for sure? Of course, this update of mine will be "3.0.0" instead of adding more to "2.x.x" version as this update would introduce many new functions, models, and things. |
I am expecting this to take around solid 2-3 weeks of work. After this update, this package will be able to scrape everything literally. For example, you would be able to scrape all forum posts of user, users comments posted on the user page, clubs, badges, detailed biography and comments, reviews, recommendations, and so on. My initial plan was to just add this type and be done, but after digging, it seems like this package really needs some updates. Don't worry, I'll let both of you know when it's done. Sorry for the constant delays, it's just that there are too many things. |
Sounds great to me! This package is in dire needs of update. I planned on working on this whenever I got the chance so I'm looking forward to this. Please do not feel pressured by time or anything, it's already great 👍 |
maybe I'm missing something, I wanted to know if there is any way we can find character info using their name just like we do to find anime malScraper.getInfoFromName(query)
if there is no way currently see if you can add that feature.
The text was updated successfully, but these errors were encountered: