Wget 不获取谷歌搜索结果 [英] Wget does not fetch google search results
本文介绍了Wget 不获取谷歌搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在运行 wget https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=foo
时注意到和类似的查询,我没有得到搜索结果,而是谷歌主页.
I noticed when running wget https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=foo
and similar queries, I don't get the search results, but the google homepage.
谷歌页面中似乎有一些重定向.有谁知道 wget
的修复方法,所以它会起作用吗?
There seems to be some redirect within the google page. Does anyone know a fix to wget
so it would work?
推荐答案
您可以使用此 curl 命令来拉取 Google 查询结果:
You can use this curl commands to pull Google query results:
curl -sA "Chrome" -L 'http://www.google.com/search?hl=en&q=time' -o search.html
用于使用 https
网址:
curl -k -sA "Chrome" -L 'https://www.google.com/search?hl=en&q=time' -o ssearch.html
-A
选项设置自定义用户代理 Chrome
以请求 Google.
-A
option sets a custom user-agent Chrome
in request to Google.
这篇关于Wget 不获取谷歌搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文