Project

query

0.0
No commit activity in last 3 years
No release in over 3 years
This GEM is designed to work for Chinese SEOers who need to fetch query and parse results from all kinds of search engines
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 10.4

Runtime

 Project Readme

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 增加其他搜索引擎