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
thomass
V2EX  ›  Python

爬拉勾碰到的问题,求帮助

  •  
  •   thomass · 2019-05-30 19:20:55 +08:00 · 2401 次点击
    这是一个创建于 1785 天前的主题,其中的信息可能已经有所发展或是发生改变。
    报错
    requests.exceptions.SSLError: HTTPSConnectionPool(host='www.lagou.com', port=443): Max retries exceeded with url: /jobs/positionAjax.json?city=%E5%8C%97%E4%BA%AC&needAddtionalResult=false (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
    10 条回复    2019-06-05 10:49:42 +08:00
    MrAcanyi
        1
    MrAcanyi  
       2019-05-30 19:34:16 +08:00
    https 协议验证问题,verify=False,试下
    thomass
        2
    thomass  
    OP
       2019-05-30 20:04:49 +08:00
    @MrAcanyi 还是不行,,好奇 SSL module is not available 是啥意思
    MrAcanyi
        3
    MrAcanyi  
       2019-05-30 20:06:04 +08:00
    避开 ssl 的验证问题,requests 模块么
    thomass
        4
    thomass  
    OP
       2019-05-30 20:25:01 +08:00
    @MrAcanyi 是 requests 模块,那要怎么解决
    lusi1990
        5
    lusi1990  
       2019-05-31 09:03:55 +08:00 via Android
    猜测是是 ssl 模块没有装好,是自己编译的 python 吗?如果是的话先装 SSL devel,然后重新编译
    beforeuwait
        6
    beforeuwait  
       2019-05-31 17:56:26 +08:00
    要装一个 openssl 吧
    thomass
        7
    thomass  
    OP
       2019-05-31 23:42:52 +08:00
    @lusi1990 是安装的 anaconda,这个问题是在 pycharm 上运行出现的,在终端上程序都正常运行的
    thomass
        8
    thomass  
    OP
       2019-05-31 23:46:38 +08:00
    @beforeuwait 安装了的,觉得是 pycharm 的问题,用 spyder 都没报错
    rocketman13
        9
    rocketman13  
       2019-06-04 12:10:15 +08:00
    urllib3.disable_warnings() 试试
    woshi88
        10
    woshi88  
       2019-06-05 10:49:42 +08:00
    SSL module is not available SSL 证书模块不可用

    @thomass
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5282 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 05:58 · PVG 13:58 · LAX 22:58 · JFK 01:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.