baidu 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/baidu.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bc31375e4db31f83b62ce356d1e42ffdc7117d3
|
|
4
|
+
data.tar.gz: dc8d01a40ad9b1a5f1309acee55b7fba2902a6cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a306949dcb4037980ab36530bcf719be371ac45075d99e8a6d1179108f644062ada12c7921ece62b6af73fe9c37744cf86cb7d7f8874da7c5cf04256ccc00072
|
|
7
|
+
data.tar.gz: 54f95627585171082e362e6244f6bfc3bb94bb8521cb0ee11b4faf6f5265b3f42bf4089e7e0779223805c931e9ddca98571f67cc496e7735281e36f732d315d5
|
data/lib/baidu.rb
CHANGED
|
@@ -233,7 +233,7 @@ class MbaiduResult < SearchResult
|
|
|
233
233
|
[]
|
|
234
234
|
end
|
|
235
235
|
def related_keywords
|
|
236
|
-
[]
|
|
236
|
+
@page.search("div[@class='relativewords_info']/a").map{|a|a.text}
|
|
237
237
|
end
|
|
238
238
|
=begin
|
|
239
239
|
#返回当前页中,符合host条件的结果
|
|
@@ -270,7 +270,6 @@ class MbaiduResult < SearchResult
|
|
|
270
270
|
page = HTTParty.get(url)
|
|
271
271
|
return MbaiduResult.new(page,url,@pagenumber+1)
|
|
272
272
|
end
|
|
273
|
-
|
|
274
273
|
end
|
|
275
274
|
class Baidu < SearchEngine
|
|
276
275
|
BaseUri = 'http://www.baidu.com/s?'
|
|
@@ -470,4 +469,5 @@ class BaiduResult < SearchResult
|
|
|
470
469
|
return false if submit and submit['href'].include?'sitesubmit'
|
|
471
470
|
return true
|
|
472
471
|
end
|
|
473
|
-
end
|
|
472
|
+
end
|
|
473
|
+
|