]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/googlefight.rb
[plugin] googlefight fixed regexp
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / googlefight.rb
old mode 100755 (executable)
new mode 100644 (file)
index 7fc748c..da156fd
@@ -54,7 +54,7 @@ class GoogleFightPlugin < Plugin
   def google_count(query)
     url  = 'http://www.google.com/search?hl=en&safe=off&btnG=Search&q=' << CGI.escape(query)
     html = Net::HTTP.get(URI.parse((url)))
-    res  = html.scan(%r{of about <b>([\d,]+)<\/b>})
+    res  = html.scan(%r{About ([\d,]+) results})
     res[0][0].to_s.tr(",", "").to_i
   end
 end