fiddler抓取不到python-request的包?InsecureRequestWarning: Unverified HTTPS request is being made to host '
程序员文章站
2022-07-12 14:50:23
...
问题一:在使用python-requests做接口请求时,fiddler抓取不到request请求?
解决方式:在request.get()\requet.post()里面加参数:verify=False;目的是:移除SSL认证;此时,fiddler就可以抓取到python-requets 请求的包了;
问题二:当使用Python requests 设置verify=False移除SSL认证时,出现InsecureRequestWarning警告,如何解决?
InsecureRequestWarning: Unverified HTTPS request is being made to host 'passport.baidu.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
解决方式:
import urllib3
from urllib3.exceptions import InsecureRequestWarning
urllib3.disable_warnings(InsecureRequestWarning)
上一篇: django3+mysql8
下一篇: Pytest自动化测试框架学习(三)