Closed respektive closed 1 year ago
I didn't implement credentials before because Boorus do it in a bunch of different ways and I couldn't come up with a "nice" way of doing it, but I'm also being hit with this issue so I've really gotta put aside my current project and fix booru
It might take a bit because I'm busy for the next few days but I'll see what I can do
Added in booru@2.6.0
const booru = require('booru')
const gelbooru = booru.forSite('gb', { api_key: 'key', user_id: 'id' })
gelbooru.getSearchUrl()
// https://gelbooru.com/index.php?page=dapi&s=post&q=index&json=1&tags=&limit=100&pid=1&api_key=key&user_id=id
// or
booru.search('gb', [], {
credentials: { api_key: 'key', user_id: 'id' },
})
// Uses the same search URL as above
The limit seems to be pretty low. Anytime I try to search on gelbooru I get an error saying
Search error: We have exceeded maximum queries per day for anonymous usage. Yukkuri Shiteitte ne! :<
. This can be avoided by setting theapi_key
anduesr_id
URL parameters, which i currently do in a bit of a hacky way, by editing the api search url. In the future the credentials param on the BooruClass should probably be used.