[英]SSL: WRONG_VERSION_NUMBER ON PYTHON REQUEST
Python version: 3.9.1 Python 版本:3.9.1
I trying to write bot that send requests and it work perfectly fine, the only issue that i have is when i trying to use web debugging programs such as Charles 4.6.1 or Fiddler Everywhere.我试图编写发送请求的机器人,它工作得非常好,我唯一的问题是当我尝试使用 web 调试程序(如 Charles 4.6.1 或 Fiddler Everywhere)时。 When I open it to see bot traffic and response form server it crash showing me this error:当我打开它以查看机器人流量和响应表单服务器时,它崩溃了,向我显示了这个错误:
(Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1124)')))
I used to have this issue and I was able to fix it by simply adding verify=False
to my request, but right now it does not work.我曾经遇到过这个问题,我可以通过简单地在我的请求中添加verify=False
来解决它,但现在它不起作用。
I had the same problem.我有同样的问题。 It's a bug in urllib3.这是 urllib3 中的一个错误。 You have to specify your proxy in the request, and change the 'https' value to 'http'.您必须在请求中指定您的代理,并将“https”值更改为“http”。
My example:我的例子:
proxies = {'https': 'http://127.0.0.1:8888'}
request = r.get('https://www.example.net', verify=False, proxies=proxies)
Works fine, problem solved.工作正常,问题解决。 I wonder what if this downgraded version will become soon deprecated in the future..我想知道如果这个降级版本将来会很快被弃用怎么办..
I had the same problem but i solved it by changing the "https" in the URL to "http":我有同样的问题,但我通过将 URL 中的“https”更改为“http”来解决它:
Example:例子:
ulr_example = 'https://example.com'
to至
url_example = 'http://example.com'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.