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
946 stars 121 forks source link

Question: SSL WRONG_VERSION_NUMBER with proxy #178

Closed takabinance closed 3 months ago

takabinance commented 5 months ago

I've recently upgraded to v0.12. I have also switched proxy servers.

After that I started sporadically getting the following message on all accounts. It works fine for hours and then it hits this issue and times all accounts out:

2024-04-26 20:50:04.938 | WARNING | twscrape.queue_client:req:243 - Unknown error. Account timeouted for 15 minutes. Create issue please: https://github.com/vladkens/twscrape/issues If it mistake, you can unlock account now with `twscrape reset_locks`. Err: <class 'ssl.SSLError'>: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1006)

In 20 seconds, it locks about 100 accounts.

If I wait 15 minutes or execute twscrape reset_locks, everything works fine again. It seems to do this a few times per day (again, on all accounts).

If it's related to proxy server availability (??), it seems maybe better to add a delay (and maybe not lock for 15 minutes)... but is it possible it's related to proxy <> Twitter?

vladkens commented 3 months ago

Hi, @takabinance.

Answered here: https://github.com/vladkens/twscrape/issues/198#issuecomment-2198291001

Most likely periodic proxy error