Fiddler没有捕获我的脚本的请求 [英] Fiddler does not capture my script's requests

查看:192
本文介绍了Fiddler没有捕获我的脚本的请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码: 此请求未显示在Fiddler的捕获中,有人知道如何配置Fiddler以便捕获该请求吗?

该请求有效,我可以看到其中的内容.另外,如果我关闭Fiddler,由于没有代理,请求将按预期失败.只是我没有在Fiddler中看到任何东西.

我看到了我编写的.NET测试控制台应用程序带来的流量.但是我没有看到来自我的python脚本的流量.

解决方案

即使打开fiddler2,我也遇到了完全相同的问题 proxy = urllib2.ProxyHandler({'http': 'http://asdfl.com:13212/'})(这样不存在的代理服务器),它仍然可以获取页面内容,我想也许是当fiddler2设置了代理服务器时,urllib2由于某种原因完全忽略了ProxyHandler,仍然无法弄清楚.


我明白了,检查stackoverflow中的线程: urllib2不使用代理(Fiddler2),使用ProxyHandler

在Fiddler2中,转到页面Tools->Fiddler Options ...->Connections,从"IE should bypass Fiddler for ..."字段中的值中删除结尾的分号,然后重新启动Fiddler2.

该解决方案解决了我的问题,希望您在遇到困难时能帮助到别人.

my code:

proxy = urllib2.ProxyHandler({'http': '127.0.0.1:8888'})
opener = urllib2.build_opener(proxy)
urllib2.install_opener(opener)
f = urllib2.urlopen('http://www.google.com')
print f.read()

this request does not show in Fiddler's capture, does anyone know how to configure Fiddler so that the request is captured?

EDIT: the request works, and I can see the contents. Also, if I close Fiddler, the request fails, as expected, because there is no proxy. It is just that I do not see anything in Fiddler.

EDIT2: I see traffic from a .NET test console application that I wrote. But I do not see traffic from my python script.

解决方案

I got the exactly the same issue, when fiddler2 opens, even I change proxy = urllib2.ProxyHandler({'http': 'http://asdfl.com:13212/'}) (such none existing proxy server), it still can get the page content, I guess maybe when proxy server has been setup by fiddler2, urllib2 totally ignore the ProxyHandler for some reason, still can't figure out.


I got it, check that thread in stackoverflow: urllib2 doesn't use proxy (Fiddler2), set using ProxyHandler

In Fiddler2, go to the page Tools->Fiddler Options ...->Connections, remove the trailing semicolon from the value in the "IE should bypass Fiddler for ..." field and restart Fiddler2.

this solution solved my problem, hope can help someone if you are struggling with it.

这篇关于Fiddler没有捕获我的脚本的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆