Class: PageRankr::Backlinks::Google

Inherits:
Object
  • Object
show all
Includes:
PageRankr::Backlink
Defined in:
lib/page_rankr/backlinks/google.rb

Instance Attribute Summary

Attributes included from Tracker

#body, #raw, #tracked

Instance Method Summary collapse

Methods included from PageRankr::Backlink

#clean

Methods included from Tracker

#clean, #content, #initialize, #method, #proxy, #run, #supported_components, #tracked_url

Instance Method Details

#nameObject



20
21
22
# File 'lib/page_rankr/backlinks/google.rb', line 20

def name
  :backlinks_google
end

#paramsObject



12
13
14
# File 'lib/page_rankr/backlinks/google.rb', line 12

def params
  {:q => "link:#{tracked_url}"}
end

#urlObject



8
9
10
# File 'lib/page_rankr/backlinks/google.rb', line 8

def url
  "http://www.google.com/search"
end

#xpathObject



16
17
18
# File 'lib/page_rankr/backlinks/google.rb', line 16

def xpath
  "//div[@id='resultStats']/text()"
end