rainyroads / twitter-saucenao

A Twitter bot that utilizes the SauceNao API to find the source of images or anime screencaps
GNU Affero General Public License v3.0
257 stars 19 forks source link

Possibly look into scraping booru's for character / anime title's #21

Closed rainyroads closed 3 years ago

rainyroads commented 4 years ago

I do have a library for interacting with the official Gelbooru API here: https://github.com/FujiMakoto/pygelbooru

But unfortunately, the API just returns an unsorted tag list.

For what I'm thinking, when the bot finds a booru search result, it'd be nice if we could scrape the name of the anime and possibly the character from that page and include that information in our tweet.

Would need to make sure this wouldn't anger Gelbooru's servers first though.

Xamayon commented 4 years ago

The majority of Gelbooru tags have Danbooru equivalents, and Danbooru has a convenient API for it. If there is no better way, you can use the Danbooru tag API to periodically get the tag to type mapping data for everything.

I could also just add the tag data to the SN API if it's not there already, unless you're intending to get the latest info from the boorus.

rainyroads commented 3 years ago

I believe @Xamayon actually added support for this into saucenao a while ago and I just never got around to closing this issue; we do have access to character and source fields now either way!