欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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 请求的包了;

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

问题二:当使用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,

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

解决方式:

import urllib3
from urllib3.exceptions import InsecureRequestWarning

urllib3.disable_warnings(InsecureRequestWarning)

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