Fiddler没有捕获我脚本的请求(Fiddler does not capture my script's requests)

编程入门 行业动态 更新时间:2024-10-26 22:28:59
Fiddler没有捕获我脚本的请求(Fiddler does not capture my script's requests)

我的代码:

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() 这个请求没有在Fiddler的捕获中显示,有没有人知道如何配置Fiddler以便捕获请求?

编辑:请求工作,我可以看到内容。 此外,如果我关闭Fiddler,请求会失败,正如预期的那样,因为没有代理。 只是我在Fiddler看不到任何东西。

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

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.

最满意答案

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


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

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

这个解决方案解决了我的问题,希望可以帮助别人,如果你正在努力。

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.

更多推荐

本文发布于:2023-08-07 12:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   Fiddler   capture   requests   script

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!