在Ruby中使用Google Search REST API
我正在尝试使用Ruby进行谷歌搜索,并打印前3个结果。
谁能指点我一个示例代码? 我找不到了。
gemgoogleajax
就是为此:
require 'googleajax' GoogleAjax.referer = "your_domain_name_here.com" GoogleAjax::Search.web("Hello world")[:results][0...3]
现在,Google希望您使用此http://code.google.com/p/google-api-ruby-client/ ,其中包含100个礼节性查询,以及高于该值的任何内容的定价结构。