开着 fiddler 干别的事情,一段时间后发现完全没有爬虫程序的记录。 程序和 fiddler 都在正常工作,用的是最新的 fiddler everywhere,开了捕获 https 请求。 请知道的大佬解释下原因
1 julyclyde 2021-02-20 14:06:23 +08:00 fiddler 是个代理服务器 |
![]() | 2 Itoktsnhc 2021-02-20 14:17:30 +08:00 fiddle 只能抓到使用系统配置代理的程序的请求 手动设置一下试试? |
3 smart9527 2021-02-20 14:22:44 +08:00 fiddler 是个代理服务器, scrapy 要设置代理 |
![]() | 4 woyao396 2021-02-20 14:28:30 +08:00 ![]() https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware 原因就是 1&2 楼 设置环境变量 http_proxy 及 https_proxy 为 fiddler 代理服务器的地址 linx ```sh #host 为 fiddler 所在 IP,8888 是 fiddler 默认端口号 如: export http_proxy=http://localhost:8888 export https_proxy=http://localhost:8888 ``` windows ```sh set http_proxy=http://localhost:8888 set https_proxy=http://localhost:8888 ``` |
5 tuoov OP 感谢各位 |
![]() | 6 ch2 2021-02-20 22:13:27 +08:00 fiddler 只能抓到对局域网代理生效的程序的包 |