Python Requests throwing SSLError

前端 未结 24 2695
小蘑菇
小蘑菇 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:27

    From requests documentation on SSL verification:

    Requests can verify SSL certificates for HTTPS requests, just like a web browser. To check a host’s SSL certificate, you can use the verify argument:

    >>> requests.get('https://kennethreitz.com', verify=True)
    

    If you don't want to verify your SSL certificate, make verify=False

提交回复
热议问题