代码之家  ›  专栏  ›  技术社区  ›  Dogbert

在ruby中使用google搜索rest api

  •  8
  • Dogbert  · 技术社区  · 15 年前

    我正在尝试使用ruby进行google搜索,并打印前3个结果。

    有人能给我指一个示例代码吗?我找不到它。

    2 回复  |  直到 13 年前
        1
  •  7
  •   Marc-André Lafortune    15 年前

    宝石 googleajax 有没有这个:

    require 'googleajax'
    GoogleAjax.referer = "your_domain_name_here.com"
    GoogleAjax::Search.web("Hello world")[:results][0...3]
    
        2
  •  3
  •   Sam Rose    13 年前

    现在谷歌想让你用这个 http://code.google.com/p/google-api-ruby-client/ 有100个礼节性问题的限制,以及任何高于此的价格结构。

    推荐文章