lib/page_rankr/backlinks/bing.rb in PageRankr-1.7.1 vs lib/page_rankr/backlinks/bing.rb in PageRankr-2.0.0
- old
+ new
@@ -1,11 +1,14 @@
-require 'cgi'
+require 'typhoeus'
module PageRankr
- class Backlinks < Tracker
- class Bing < Backlink
- def url(site)
- "http://www.bing.com/search?q=link%3A#{CGI.escape(site)}"
+ class Backlinks
+ class Bing
+ include Backlink
+
+ def request
+ @request ||= Typhoeus::Request.new("http://www.bing.com/search",
+ :params => {:q => "link:#{@site.to_s}"}, :method => :get)
end
def xpath
"//span[@class='sb_count']/text()"
end
\ No newline at end of file