lib/page_rankr/ranks/compete.rb in PageRankr-2.0.4 vs lib/page_rankr/ranks/compete.rb in PageRankr-3.0.0
- old
+ new
@@ -1,23 +1,18 @@
-require 'typhoeus'
+require File.expand_path('../../rank', __FILE__)
require 'cgi'
-require 'nokogiri'
module PageRankr
class Ranks
class Compete
include Rank
+ def url
+ "http://siteanalytics.compete.com/#{CGI.escape(@site.domain)}/"
+ end
+
def xpath
"//div[@class='section score']/h4[2]/text()"
- end
-
- def request
- @request ||= Typhoeus::Request.new("http://siteanalytics.compete.com/#{CGI.escape(@site.domain)}/")
- end
-
- def clean(rank)
- rank.to_s.gsub(/[#,]/, '').to_i
end
end
end
end