Class: SeoTools::Engine::Google

Inherits:
Base
  • Object
show all
Extended by:
PageRank
Defined in:
lib/seotools/engine/google.rb,
lib/seotools/engine/google/pagerank.rb

Defined Under Namespace

Modules: PageRank

Constant Summary

Constants included from PageRank

PageRank::GOOGLE_MAGICK, PageRank::MODULO

Class Method Summary collapse

Methods included from PageRank

chars_to_i, get_check_sum, get_page_rank, mix, zero_fill

Methods inherited from Base

build_keyword, get_rank, request

Class Method Details

.build_query(keyword, page = 1, uri = nil) ⇒ Object



8
9
10
11
12
# File 'lib/seotools/engine/google.rb', line 8

def self.build_query(keyword, page = 1, uri = nil)
	query = super
	offset = (page - 1) * 100
	query.sub(Regexp.new(Regexp.quote('[%offset%]')), offset.to_s)
end

.uriObject



4
5
6
# File 'lib/seotools/engine/google.rb', line 4

def self.uri
	"http://www.google.co.jp/search?lr=lang_ja&ie=utf-8&oe=utf-8&q=[%keyword%]&offeset=[%offset%]&num=100"
end