baidu 1.1.5 → 1.1.6

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/baidu.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e5e2be5751728aa5aab6cc36fc9552a74aadba1
4
- data.tar.gz: 28a8bb12fad2e0d3164908a61f13a9fc1d1d03e2
3
+ metadata.gz: 52b9cd5797526c064fbc02c78c64e1065fa0c8aa
4
+ data.tar.gz: bc4ad98a35ed10d2a37f0d152257807a292f2f1a
5
5
  SHA512:
6
- metadata.gz: d2b99a90386ebad73fac60db3331d0ea3e8021c657ef7d6d4c0b703023df86f8b3bfc2df434862a07dcc7b1496f026779bcbd592b9159e11ae2790ccdb9d0481
7
- data.tar.gz: ea3191864319521de14ab735a770e08204a64fc40e23d836be4e196669f24e2b0f1c994f2ab9ed2e5f924ebb650f8dba6f6ae318a472bdc46d64c27b3afb684d
6
+ metadata.gz: e073bc2876edaf4f7fc5abe13f986cb8d5b49ae31c797d21e246230cd004470c8a51accea5d63d9b97502f6e9e0d4b94d4c8f326f90e20885a743aa39fe70dd3
7
+ data.tar.gz: ba35086716501e36a2b026e65a2632daab8db3ed0301fd36b3f72796edc838032f611842d0350e972999c364f0d9426c83771b45bce43a100764814a1e4040e7
@@ -216,9 +216,9 @@ class Baidu < SearchEngine
216
216
  PerPage = 100
217
217
 
218
218
  def initialize
219
- @a = Mechanize.new {|agent| agent.user_agent_alias = 'Linux Mozilla'}
220
- @a.idle_timeout = 2
221
- @a.max_history = 1
219
+ # @a = Mechanize.new {|agent| agent.user_agent_alias = 'Linux Mozilla'}
220
+ # @a.idle_timeout = 2
221
+ # @a.max_history = 1
222
222
  @page = nil
223
223
  end
224
224
 
@@ -253,7 +253,7 @@ class Baidu < SearchEngine
253
253
  =end
254
254
 
255
255
  def popular?(wd)
256
- return @a.get("http://index.baidu.com/main/word.php?word=#{URI.encode(wd.encode("GBK"))}").body.include?"boxFlash"
256
+ return HTTParty.get("http://index.baidu.com/main/word.php?word=#{URI.encode(wd.encode("GBK"))}").body.include?"boxFlash"
257
257
  end
258
258
 
259
259
  def query(wd)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baidu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - seoaqua