开发者

Using Google Search REST API in Ruby

开发者 https://www.devze.com 2022-12-27 07:25 出处:网络
I\'m t开发者_运维技巧rying to do a google search using Ruby, and print the 1st 3 results. Could anyone point me to a sample code? I\'m unable to find it.The gem googleajax is there for that:

I'm t开发者_运维技巧rying to do a google search using Ruby, and print the 1st 3 results.

Could anyone point me to a sample code? I'm unable to find it.


The gem googleajax is there for that:

require 'googleajax'
GoogleAjax.referer = "your_domain_name_here.com"
GoogleAjax::Search.web("Hello world")[:results][0...3]


Now Google wants you to use this http://code.google.com/p/google-api-ruby-client/ with a limit of 100 courtesy queries, and a pricing structure for anything above that.

0

精彩评论

暂无评论...
验证码 换一张
取 消