Python Requests throwing SSLError

前端 未结 24 2969
小蘑菇
小蘑菇 2020-11-22 02:49

I\'m working on a simple script that involves CAS, jspring security check, redirection, etc. I would like to use Kenneth Reitz\'s python requests because it\'s a great piec

24条回答
  •  醉梦人生
    2020-11-22 03:41

    $ pip install -U requests[security]

    • Tested on Python 2.7.6 @ Ubuntu 14.04.4 LTS
    • Tested on Python 2.7.5 @ MacOSX 10.9.5 (Mavericks)

    When this question was opened (2012-05) the Requests version was 0.13.1. On version 2.4.1 (2014-09) the "security" extras were introduced, using certifi package if available.

    Right now (2016-09) the main version is 2.11.1, that works good without verify=False. No need to use requests.get(url, verify=False), if installed with requests[security] extras.

提交回复
热议问题