baidu 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/baidu.rb +2 -2
  2. metadata +1 -1
@@ -117,7 +117,7 @@ class BaiduResult
117
117
  @ranks[id]['href'] = a.first['href'].sub('http://www.baidu.com/link?url=','').strip
118
118
  unless url.nil?
119
119
  url = url.text.strip
120
- @ranks[id]['host'] = URI(URI.encode("http://#{url}")).host
120
+ @ranks[id]['host'] = Addressable::URI.parse(URI.encode("http://#{url}")).host
121
121
  else
122
122
  @ranks[id]['host'] = nil
123
123
  end
@@ -162,4 +162,4 @@ class BaiduResult
162
162
  def next
163
163
  @page = BaiduResult.new(Mechanize.new.click(@page.link_with(:text=>/下一页/))) unless @page.link_with(:text=>/下一页/).nil?
164
164
  end
165
- end
165
+ end
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.0.7
4
+ version: 1.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: