lib/page_rankr/backlinks/bing.rb in PageRankr-2.0.4 vs lib/page_rankr/backlinks/bing.rb in PageRankr-3.0.0

- old
+ new

@@ -1,16 +1,19 @@ -require 'typhoeus' +require File.expand_path('../../backlink', __FILE__) module PageRankr 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) + + def url + "http://www.bing.com/search" end - + + def params + {:q => "link:#{@site.to_s}"} + end + def xpath "//span[@class='sb_count']/text()" end def clean(backlink_count) \ No newline at end of file