selenium-twitter-scraper icon indicating copy to clipboard operation
selenium-twitter-scraper copied to clipboard

Failed Logging in to Twitter Require Single-Use Code

Open ericariyanto opened this issue 2 years ago • 9 comments

Loading .env file
Loaded .env file


Initializing Twitter Scraper...
Setup WebDriver...
Initializing ChromeDriver...
WebDriver Setup Complete

Logging in to Twitter...

Login Failed: This may be due to the following:

- Internet connection is unstable
- Username is incorrect
- Password is incorrect

I believe that error because Twitter send a Single Use Code to my email like 2 factor auth ( although I have disabled 2 factor auth ).

Is that possible if add one more step to submit Single-Use code for Login?

ericariyanto avatar Oct 18 '23 18:10 ericariyanto

I have a problem too. After 3 successful logins, the fourth time I get that error. When logging in from the web I noticed that after entering my login and password it asks me for further verification

fashionprivate avatar Oct 24 '23 07:10 fashionprivate

comment this line: https://github.com/godkingjay/selenium-twitter-scraper/blob/ac2f8cc600e0d07512916aa98e8143bd9c8cb9eb/scraper/twitter_scraper.py#L129C9-L129C50 And see what the browser is expecting. Then you will know why

dannykellett avatar Jan 09 '24 12:01 dannykellett

Yo también tengo un problema. Después de 3 inicios de sesión exitosos, la cuarta vez aparece ese error. Al iniciar sesión desde la web noté que después de ingresar mi nombre de usuario y contraseña me pide una verificación adicional

I have the same reply message. and I notice that it sends me a code to my email. has anyone already solved the case?

ainteligencia avatar Feb 16 '24 14:02 ainteligencia

I have a problem too. After 3 successful logins, the fourth time I get that error. When logging in from the web I noticed that after entering my login and password it asks me for further verification

Same as mine. I think it's a part of Twitter's security mechanism.

If you want to scrape using this tool more than 3 times, you need to log in to Twitter, finish that verification first, and then run this tool again. It worked for me.

azizp128 avatar Mar 12 '24 11:03 azizp128

I have a problem too. After 3 successful logins, the fourth time I get that error. When logging in from the web I noticed that after entering my login and password it asks me for further verification

Same as mine. I think it's a part of Twitter's security mechanism.

If you want to scrape using this tool more than 3 times, you need to log in to Twitter, finish that verification first, and then run this tool again. It worked for me.

I am still experiencing failed login. How did you get pass that step? I did not get any verification request either.

psalmuel19 avatar Apr 18 '24 19:04 psalmuel19

I have a problem too. After 3 successful logins, the fourth time I get that error. When logging in from the web I noticed that after entering my login and password it asks me for further verification

Same as mine. I think it's a part of Twitter's security mechanism.

If you want to scrape using this tool more than 3 times, you need to log in to Twitter, finish that verification first, and then run this tool again. It worked for me.

I am still experiencing failed login. How did you get pass that step? I did not get any verification request either.

Are you logging in for the first time or after a few times?"

azizp128 avatar Apr 19 '24 03:04 azizp128

I have a problem too. After 3 successful logins, the fourth time I get that error. When logging in from the web I noticed that after entering my login and password it asks me for further verification

Same as mine. I think it's a part of Twitter's security mechanism. If you want to scrape using this tool more than 3 times, you need to log in to Twitter, finish that verification first, and then run this tool again. It worked for me.

I am still experiencing failed login. How did you get pass that step? I did not get any verification request either.

Are you logging in for the first time or after a few times?"

Yes it is first time login

psalmuel19 avatar Apr 19 '24 10:04 psalmuel19

I have a problem too. After 3 successful logins, the fourth time I get that error. When logging in from the web I noticed that after entering my login and password it asks me for further verification

Same as mine. I think it's a part of Twitter's security mechanism. If you want to scrape using this tool more than 3 times, you need to log in to Twitter, finish that verification first, and then run this tool again. It worked for me.

I am still experiencing failed login. How did you get pass that step? I did not get any verification request either.

Are you logging in for the first time or after a few times?"

Yes it is first time login

If it's your first time login, maybe you can try to login directly using the command line argument instead of using .env file, also make sure that your password doesn't contain any special chars. Because in my case, that's the problem of me failing to log in for the first time.

azizp128 avatar Apr 21 '24 06:04 azizp128

I have a problem too. After 3 successful logins, the fourth time I get that error. When logging in from the web I noticed that after entering my login and password it asks me for further verification

Same as mine. I think it's a part of Twitter's security mechanism. If you want to scrape using this tool more than 3 times, you need to log in to Twitter, finish that verification first, and then run this tool again. It worked for me.

I am still experiencing failed login. How did you get pass that step? I did not get any verification request either.

Are you logging in for the first time or after a few times?"

Yes it is first time login

If it's your first time login, maybe you can try to login directly using the command line argument instead of using .env file, also make sure that your password doesn't contain any special chars. Because in my case, that's the problem of me failing to log in for the first time.

How do I run it without the .env file because I am using the command line. I run python scraper from the selenium twitter scraper folder. Then it loads that line that shows the .env file.

psalmuel19 avatar Apr 22 '24 08:04 psalmuel19