-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Twitter: detect when account is blocked #5300
Comments
I would need Twitter's API response when this happens to know what to check for. |
I did that, and it wrote a file with these contents:
|
By the way, if anyone is curious: I could unblock it and continue scraping by logging in with the browser and solving the captcha thing. |
- display proper error message - add 'locked' option
This error now gets a proper error message and you can tell it to wait until you unblocked your account (although I don't know if Twitter will actually let you continue). (d53db6e) |
Thank you! |
@mikf I noticed that this returns the same error code as some other failures. For example, if a user's tweets are protected, it also returns 16. Could this get a separate exit code? So far I'm not trying to parse gallery-dl output, because that would mess with download process display etc., so I only have the exit code. |
Were there more steps to it? Because after I initially unblocked it on my browser, it still acts like it couldn't authenticate me, even when I tried logging in from different browsers. Is there something in the config files that I might be missing? |
I'm solving this for now by assuming the account is blocked if it doesn't work for other random users 3 times in a row. The probability that 3 random users have protected their tweets is low enough.
When I can access an account from my browser, gallery-dl also works. Maybe you have to delete the gallery-dl cache file to force gallery-dl to login again. |
@trip54654 You can set a custom exit code with something like
|
Twitter will occasionally block your account for scraping. (Until now I could always unblock it by solving their puzzle-captcha.) When this happens gallery-dl thinks that it couldn't find the twitter user it's trying to access.
It would be great if it could detect getting blocked and return a special error code for it.
The text was updated successfully, but these errors were encountered: