Skip to content
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

Gelbooru limits anonymous usage now #90

Closed
respektive opened this issue Jul 19, 2022 · 2 comments
Closed

Gelbooru limits anonymous usage now #90

respektive opened this issue Jul 19, 2022 · 2 comments
Assignees
Labels

Comments

@respektive
Copy link
Contributor

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 the api_key and uesr_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.

@AtoraSuunva
Copy link
Owner

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

@AtoraSuunva AtoraSuunva self-assigned this Jul 20, 2022
@AtoraSuunva
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants