requests.exceptions.SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol

后端 未结 2 1263
春和景丽
春和景丽 2021-01-16 17:31

I have tried everything on this q&a to solve it but I still receive that error.

My latest attempt is based on Lukasa\'s comment and my code looks like this:

2条回答
  •  悲哀的现实
    2021-01-16 18:17

    You have to use http as the protocol for your proxy (although you are using https over it)

    proxy = 'http://78.130.136.2:8080'
    

    But like @sigmavirus24 said the current release version of requests has some problems with http proxies. With this setting you will be able to use the proxy (not all proxies but this proxy in particular works).

    Be careful: With the current version the data is NOT encrypted between you and your proxy.

    Repeat: The proxy and everything between it and you can read the data!

提交回复
热议问题