zoukankan      html  css  js  c++  java
  • pycharm发送请求fiddler抓包失败和警告:InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See

    1、fiddler抓包pycharm失败

    原来的代码:

    r = requests.post(url, data)

    此时发送的请求fiddler抓取不了数据

    修改为:

    fiddler_proxies = {'http': 'http://127.0.0.1:8080', 'https': 'http://127.0.0.1:8080'}   # 避免fiddler抓不到请求数据而设置的
    r = requests.post(url, data, proxies=fiddler_proxies, verify=False) # verify和proxies均是为了可以正常使用fiddler抓而设

    再次尝试,可以正常抓包,但是有警告:InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See

    2、解决警告:InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See

    在发送请求前,添加代码,如下:

    fiddler_proxies = {'http': 'http://127.0.0.1:8080', 'https': 'http://127.0.0.1:8080'}   # 避免fiddler抓不到请求数据而设置的
    # 取消警告:InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See
         requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
    r = requests.post(url, data, proxies=fiddler_proxies, verify=False)  # verify和proxies均是为了可以正常使用fiddler抓而设
  • 相关阅读:
    [SHOI2015]自动刷题机
    【教程】AI画放射图
    AI画圆角矩形
    极限运动:街头极限单车,不只是牛逼!
    DPK750针式打印机驱动,750u.dll下载
    文艺青年必看的Ⅹ部心理电影
    C语言程序设计-第2章 算法-程序的灵魂
    C语言程序设计-第1章 程序设计和C语言
    20151127笔记
    20151125小概念
  • 原文地址:https://www.cnblogs.com/will-wu/p/15380228.html
Copyright © 2011-2022 走看看