擅长:python、mysql、java
<p>这是工作代码</p>
<pre><code>scrapy shell "https://www.google.com.tw/search?q=test"
response.xpath("//a[@id='pnnext']/@href")
</code></pre>
<p>问题在于你向谷歌提出请求的方式。在</p>
<p>在任何情况下,请注意谷歌搜索的政策。在</p>
<p>谷歌的定制搜索服务条款(TOS)可以在<a href="http://www.google.com/cse/docs/tos.html" rel="nofollow">http://www.google.com/cse/docs/tos.html</a>找到。在</p>
<p><strong>更新:</strong>
我写了一个蜘蛛来更深入地测试这个问题。在</p>
<p>完全不是pythonic(欢迎改进),但我对处理google结果的机制感兴趣。在</p>
<p>正如前面的评论所建议的,需要对接口的国际化进行测试。在</p>
^{pr2}$