Skip to content

Instantly share code, notes, and snippets.

@fengxuway
Created August 18, 2016 05:55
Show Gist options
  • Save fengxuway/1d90f0f7737ce74e7cb7f12769db6df4 to your computer and use it in GitHub Desktop.
Save fengxuway/1d90f0f7737ce74e7cb7f12769db6df4 to your computer and use it in GitHub Desktop.
调用接口报错解决办法: SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
import ssl
context = ssl._create_unverified_context()
urllib.urlopen("https://no-valid-cert", context=context)
requests.get('URL', verify=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment