2014-11-06 112 views
1

scrapy shell当我尝试了谷歌的搜索结果页面:Scrapy删除查询字符串响应

$ scrapy shell "http://www.google.com/?gws_rd=ssl#q=%22german+beer+near%22&start=0"

我之后没有查询字符串的响应‘关于使用fetch#’ [s] request <GET http://www.google.com/?gws_rd=ssl#q=jeffrey+m+liebmann> [s] response <200 http://www.google.com/?gws_rd=ssl>

此问题属于scrapy还是Google?尝试粘贴整个URL +查询字符串,谷歌让我的结果很好。

回答

0

Google之前从http切换到https,因此您只需从请求网址中删除gws_rd=ssl即可。试试这个:

scrapy shell "https://www.google.fr/search?q=%22german+beer+near%22&start=0" 

和respose将是:

[s] request <GET https://www.google.fr/search?q=%22german+beer+near%22&start=0> 
[s] response <200 https://www.google.fr/search?q=%22german+beer+near%22&start=0> 
+0

谢谢@Nima – PieOhPah 2014-11-15 18:12:11