lib/page_rankr/backlinks/yahoo.rb in PageRankr-1.7.1 vs lib/page_rankr/backlinks/yahoo.rb in PageRankr-2.0.0

- old
+ new

@@ -1,11 +1,14 @@ -require 'cgi' +require 'typhoeus' module PageRankr - class Backlinks < Tracker - class Yahoo < Backlink - def url(site) - "http://siteexplorer.search.yahoo.com/search?p=#{CGI.escape(site)}" + class Backlinks + class Yahoo + include Backlink + + def request + @request ||= Typhoeus::Request.new("http://siteexplorer.search.yahoo.com/search", + :params => {:p => "#{@site.to_s}"}, :method => :get) end def xpath "//ol[@id='results-tab']/li[2]/a/text()" end \ No newline at end of file