推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
cuijiudai
V2EX  ›  Python

求解 python ssl 连接问题

  •  
  •   cuijiudai · Aug 26, 2013 · 5743 views
  •   You need to sign in to view this topic
    This topic created in 4668 days ago, the information mentioned may be changed or developed.
    在用 requests , 但是向 https post 表单的时候会报错,提示requests.exceptions.SSLError: [Errno 1] _ssl.c:499: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
    3 replies    1970-01-01 08:00:00 +08:00
    raptor
        1
    raptor  
       Aug 27, 2013
    在post调用时加一个参数:verify=False即可。
    原因是你请求的HTTPS服务器用的证书不被你的客户端所接受(比如是一些免费证书或自签名证书)。
    注意,这个要慎用,有安全性风险。
    cuijiudai
        2
    cuijiudai  
    OP
       Aug 27, 2013
    @raptor 不可以哦,登录不成功,能加入证书验证吗
    raptor
        3
    raptor  
       Sep 4, 2013
    @cuijiudai 应该可以,不过估计会比较麻烦,我没有试过。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6034 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 03:17 · PVG 11:17 · LAX 20:17 · JFK 23:17
    ♥ Do have faith in what you're doing.