vladkens / twscrape

2024! X / Twitter API scrapper with authorization support. Allows you to scrape search results, User's profiles (followers/following), Tweets (favoriters/retweeters) and more.
https://pypi.org/project/twscrape/
MIT License
1.13k stars 132 forks source link

Question: Ability to restrict to total requests/day per account #160

Closed mbellmbell closed 5 months ago

mbellmbell commented 7 months ago

Is there any way to restrict the number of requests for any account to X per day (or similar)? Right now, it seems like it's relying on the 50/15 restriction but then I have some accounts with 2,000+ requests/day and twitter is banning those. Wouldn't more accounts with fewer daily requests be safer?

vladkens commented 7 months ago

There is no such possibility and perhaps it is not planned.

The limits are not per account, but per api endpoint for account for time interval (per 15 min + per day). I mean that different methods have their own separate limits.

Writing these limits in code will be difficult, especially since it is impossible to track when Twitter changes its rules.

Also, the account will be banned after a while anyway, so there's not much point in protecting them.