InsecureRequestWarning警告解除

问题描述
InsecureRequestWarning: Unverified HTTPS request is being made to host 'test-api.letsfit.com'. Adding certificate verification is strongly advised.
如何解除InsecureRequestWarning警告?

添加以下代码即可

import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning

requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

猜你喜欢

转载自blog.csdn.net/weixin_44102466/article/details/109997362