无法将 Google 定义转为标准输出
我的目标是在终端过滤我的谷歌结果,这样我就只能得到谷歌的定义。
我正在尝试在 Mac 终端中运行以下
open http://www.google.com/search?q=define:cars&ie=utf-8&oe=utf-8:en-GB:official&client=vim
命令 Firefox 的类似命令是
open http://www.google.com/search?q=define:cars&ie=utf-8&oe=utf-8:en-GB:official&client=firefox-a
您可以使用哪个客户端将 Google 的 html 页面发送到您的标准输出?
I aim to filter my Google results right at terminal such that I get only Google's definitions.
I am trying to run the following in Mac's terminal
open http://www.google.com/search?q=define:cars&ie=utf-8&oe=utf-8:en-GB:official&client=vim
A similar command for Firefox is
open http://www.google.com/search?q=define:cars&ie=utf-8&oe=utf-8:en-GB:official&client=firefox-a
Which client can you use to have Google's html page to your standard output?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要不通过网络界面使用 Google 搜索,几乎可以肯定,使用他们的 API。
但是,我认为
curl
是下载网页的正确工具,如果这是您必须做的(也可能不是)To use Google search not through their web interface, you're almost certainly better off using their API.
However, I think
curl
is the right tool to use to download a web page if that's what you have to do (and it probably isn't)“GET”
另见“HEAD”。
该命令可以安装在 Gnu/Linux 操作系统上:
理论上,您也可以使用“wget”并使用类似以下内容输出到 stdout:
但是我无法让它与此示例 URL 一起使用。
"GET"
See also "HEAD".
The command can be installable on Gnu/Linux OS:
In theory you could also use "wget" and output to stdout using something like this:
However I cannot get it to work with this example URL.