Class: SeoTools::Engine::Yahoo

Inherits:
Base
  • Object
show all
Defined in:
lib/seotools/engine/yahoo.rb

Class Method Summary collapse

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/yahoo.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/yahoo.rb', line 4

def self.uri
	"http://search.yahoo.co.jp/search?p=[%keyword%]&ei=UTF-8&n=100&b=[%offset%]"
end