Skip to content

thaddeus-git/query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Query

#to get the result list by querying "abc"

Query::Engine::Baidu.new.query("abc").ranks().each do |id,value| puts id,value end

#to get the result list with host "www.abc.com.cn" by querying "abc"

Query::Engine::Baidu.new.query("abc").ranks("www.abc.com.cn").each do |id,value| puts id,value end

#to get the result list with host which fit the regex /com.cn/ by querying "abc"

Query::Engine::Baidu.new.query("abc").ranks(/com.cn/).each do |id,value| puts id,value end

to get the top rank of host "www.abc.com.cn" by querying "abc"

puts Query::Engine::Baidu.new.query("abc").rank("www.abc.com.cn")
#[3,1,2,4] => [rank_seo, rank_top_ads, rank_right_ads, rank_bottom_ads]

TODO: 查询结果不多,翻页不存在时的处理,及rspec 增加其他搜索引擎

About

No description, website, or topics provided.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages