Closed jemather closed 7 months ago
Update - based on the error I was receiving, I think it was related to logging into the email server to get the verification code. Maybe its trying to log in to the email server with the proxy and that's not working right? I was able to work around it by logging in manually and using a cookie.
Yes, most likely a proxy error.
To get around it, I signed in manually with the proxy, then extracted the ct0 and auth_token cookies. Then, when I added the account, I included the proxy:
proxy = "http://{}:{}@{}:{}".format(proxy_user, proxy_pass, proxy_host, proxy_port) await api.pool.add_account(twitter_username, twitter_password, email, email_pass, cookies = cookies, proxy=proxy) await api.pool.relogin(twitter_username)
On Wed, May 8, 2024 at 7:43 PM Patricio Segovia @.***> wrote:
I have the same problem:
@.:/home/newsearch# twscrape login_accounts 2024-05-08 20:35:53.352 | INFO | twscrape.accounts_pool:login_all:183 - [1/3] Logging in account1 - @. 2024-05-08 20:35:54.329 | ERROR | twscrape.accounts_pool:login:165 - Failed to login 'account1': [Errno -2] Name or service not known 2024-05-08 20:35:54.348 | INFO | twscrape.accounts_pool:login_all:183 - [2/3] Logging in account2 - @. 2024-05-08 20:35:55.488 | INFO | twscrape.accounts_pool:login:158 - Logged in to account2 successfully 2024-05-08 20:35:55.505 | INFO | twscrape.accounts_pool:login_all:183 - [3/3] Logging in account3 - @. 2024-05-08 20:35:56.513 | ERROR | twscrape.accounts_pool:login:165 - Failed to login 'account3': [Errno -2] Name or service not known {'total': 3, 'success': 1, 'failed': 2}
What im doing wrong?
— Reply to this email directly, view it on GitHub https://github.com/vladkens/twscrape/issues/145#issuecomment-2101723495, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNNJR4LOLFUTWV7PE6MO7DZBLBDRAVCNFSM6AAAAABEYPQTAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRG4ZDGNBZGU . You are receiving this because you authored the thread.Message ID: @.***>
I've been trying to add user-level proxies for accounts using this setup following from the Proxy examples:
After adding the accounts this way and trying to login, for every account I get the error: Failed to login to USERNAME: [Errno -2] Name or service not known
I've used the proxies with requests with no issues, and tried with several different proxies so I don't think that's the source of the issue.