goog 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/goog +2 -1
  2. data/lib/goog.rb +1 -1
  3. metadata +1 -1
data/bin/goog CHANGED
@@ -54,7 +54,8 @@ end
54
54
  doc = Nokogiri::HTML resp, nil, 'iso-8859-1'
55
55
  doc.search('ol li.g').each_with_index {|li, index|
56
56
  next unless li.at('h3 a')
57
- link = li.at('h3 a')['href'].sub(/^\/url\?q=/, '')
57
+ href = li.at('h3 a')['href']
58
+ link = href[/^\/url\?q=([^&]+)/, 1] || href
58
59
  if link !~ /^http:/
59
60
  link = "http://google.com#{link}"
60
61
  end
data/lib/goog.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Goog
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: