fiddler抓取不到python-request的包?InsecureRequestWarning: Unverified HTTPS request is being made to host '

Kenda ·
更新时间:2024-11-14
· 695 次阅读

问题一:在使用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)


作者:冷凝娇



https IS TO fiddler request host Python

需要 登录 后方可回复, 如果你还没有账号请 注册新账号