V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
x14oL
V2EX  ›  Python

Python Https requests

  •  
  •   x14oL · 2015-04-29 18:49:01 +08:00 · 6082 次点击
    这是一个创建于 3293 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用python处理https的时候出现问题,搜了好几个论坛没有解决方案- -
    在碰到一些共有证书的https站点用requests.get(url,verify=True)就解决了。
    可是一些私有证书的站点。

    不停的报错:
    requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    百度google一阵子无果- -
    求解决方案
    3 条回复    2015-04-29 23:55:15 +08:00
    zhangshine
        1
    zhangshine  
       2015-04-29 19:40:53 +08:00
    你好歹放个url让我们瞧瞧啊,不能靠猜吧
    binux
        2
    binux  
       2015-04-29 20:40:14 +08:00
    对方使用的 https 协议不支持,比如使用的是 tls 1.1/tls 1.0/ssl 3.0/ssl 2.0
    sivacohan
        3
    sivacohan  
       2015-04-29 23:55:15 +08:00 via Android
    @binux 搭车问一下。requests里面用的是urllib3,对于python 2.7.9之前的ssl支持都是有问题的。
    你们堆这种https抓取的时候,用py3直接绕过去,还是有什么高大上的黑科技啊?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2607 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:08 · PVG 22:08 · LAX 07:08 · JFK 10:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.