InsecureRequestWarning: Unverified HTTPS request is being made to host ‘xxx’. Adding certificate verification is strongly advised. See:

requests库提示警告:InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)

1、Python3访问HTTPS时移除SSL认证:

req = requests.get(url, verify=False)
2、但移除认证后控制台总是抛出警告:

添加如下代码即可:

import urllib3
urllib3.disable_warnings()
编程

if __name__ == '__main__' 如何正确理解?

2021-9-24 14:14:40

编程

phpstudy 1045-Access denied for user ‘root‘@‘localhost‘(using password: YES)

2021-9-29 14:19:26