简体   繁体   English

fiddler 不捕获 python http 请求?

[英]fiddler doesn't capture python http request?

I've tried to use fiddle2 to debug one of my python program which makes http request and gets response.我尝试使用 fiddle2 来调试我的 python 程序之一,该程序发出 http 请求并获得响应。 However I didn't see any traffic on fiddler no matter I ran python in command prompt or python GUI.但是,无论我在命令提示符或 python GUI 中运行 python,我都没有看到 fiddler 上的任何流量。 Fiddle filter is not set, ie, set to show all processes, I did see my browsers' traffic there.未设置 Fiddle 过滤器,即设置为显示所有进程,我确实在那里看到了浏览器的流量。

Is there any settings I need to set?有什么我需要设置的设置吗?

Thanks.谢谢。

Python does not use proxy by default, so fiddler cannot intercept its network traffic. Python 默认不使用代理,因此 fiddler 无法拦截其网络流量。 You may need to change the Python program a little.您可能需要稍微更改 Python 程序。 Here is another thread on how to see proxy for Python programs Proxy with urllib2 .这是关于如何 使用 urllib2查看 Python 程序 代理的另一个线程。

It will only work if you set Python to use Fiddler as a proxy.仅当您将 Python 设置为使用 Fiddler 作为代理时,它才会起作用。 It may be easier to use Wireshark , which will let you monitor all HTTP traffic, without the need for proxies.使用Wireshark可能更容易,它可以让您监控所有 HTTP 流量,而无需代理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM