-
Notifications
You must be signed in to change notification settings - Fork 44
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
Let the user choose how to handle rate limits #81
Comments
this lets the user decide how to handle it related: the-convocation#81
Definitely open to this in general, though I'm a little less sure about how to actually go about it (still need to think it over). I'm leaning towards making it part of the At any rate, the |
Okay, I've implemented a PoC of account login as a request interceptor in this branch: https://github.com/catdevnull/milei-twitter/blob/scraper-resiliente-cuentas-interceptar/scraper-manzana/scraper.ts It's a bit hacky and it doesn't actually switch accounts on errors right now, but it could be easily implemented (EDIT: now implemented :). I'll probably implement this in my staging environment soon. It would probably be cleaner to use if we could access the cookie jar from outside the library |
(ignore) referencing #84 for discoverability |
Hi! I've been liking this library a lot as you can see :)
Something that I would like to have for my project is being able to choose how rate limits are handled. Specifically, I want to implement a behavior similar to the one in twscrape where if an account has a rate limit, it re-tries with another account that doesn't. However, because of how twitter-scraper currently works it's not possible to choose, and it just waits until the rate limit is reset which can take a long time.
I'm probably going to do the easiest patch for my fork which is going to be throwing a special error (something like
RateLimitError
) fromrequestApi
to be able to handle it from my code, but I would like to find a solution that can be applied upstream.Thanks <3
The text was updated successfully, but these errors were encountered: