How to ignore an SSL: CERTIFICATE_VERIFY_FAILED error?
遇到此错误后如何保持脚本运行?
requests.exceptions.SSLError:
HTTPSConnectionPool(host='www.funcate.org.br', port=443): Max retries
exceeded with url: /pt/portal-de-compras?file=../../../index.php%250A
(Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:718)'),))
通过将
1 | response = requests.get('https://foobar.com.br/', verify=False) |
请注意,这会使你容易受到各种中间人的攻击。使用SSL证书有一个原因:(-)尽管我知道您不一定能够执行此操作。