我需要为 curl
以某种方式模拟选项 -k
(vide --insecure
以忽略 SSL 证书验证)但使用 urllib2
。有什么线索吗?
最佳答案
这里没什么特别的。 urllib2
默认不做SSL证书验证。文档中有警告 http://docs.python.org/library/urllib2.html
Warning HTTPS requests do not do any verification of the server’s certificate.
关于python - urllib2 - 能够跳过证书验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11724765/