我有这种奇怪的情况,
我有一个链接可用于我目前拥有的所有浏览器(chrome,IE,firefox
),我尝试使用scrapy
中的python
抓取页面。但是我得到response.status == 400
,我正在使用tor + polipo
进行匿名爬网
response.body
是:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>Proxy error: 400 Couldn't parse URL.</title>
</head><body>
<h1>400 Couldn't parse URL</h1>
<p>The following error occurred while trying to access <strong>https://exmpale.com/blah</strong>:<br><br>
<strong>400 Couldn't parse URL</strong></p>
<hr>Generated Thu, 11 Dec 2014 13:55:38 UTC by Polipo on <em>localhost:8123</em>.
</body></html>
我只是想知道为什么会这样,难道浏览器可以获取结果但不能获取scrapy
?
我的案子:https://www.a.com?a=b是200https://www.a.com/?a=b是400
因此请检查标题和cookie和URL