使用 requests 库发送请求时报了以下警告:

/python3.6/lib/site-packages/urllib3/connectionpool.py:847: 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)

解决办法:

import requests

#关闭安全请求警告
requests.packages.urllib3.disable_warnings()
Last modification:February 22nd, 2022 at 11:18 am