lib/page_rankr/ranks/google.rb in PageRankr-2.0.3 vs lib/page_rankr/ranks/google.rb in PageRankr-2.0.4

- old
+ new

@@ -3,30 +3,30 @@ module PageRankr class Ranks class Google include Rank - + def initialize(site) @site = site @checksum = Checksum.generate(@site.to_s) - + request.on_complete do |response| @rank = if response.body =~ regex clean($1) else nil end end end - + def regex /Rank_\d+:\d+:(\d+)/ end def request - @request ||= Typhoeus::Request.new("http://toolbarqueries.google.com/search", + @request ||= Typhoeus::Request.new("http://toolbarqueries.google.com/tbr", :params => {:client => "navclient-auto", :ch => @checksum, :features => "Rank", :q => "info:#{@site.to_s}"}) end end end -end \ No newline at end of file +end