X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fgooglefight.rb;h=894d2233cdae37c17ccb9131dfc6c597778fee7a;hb=052217de30c59206d7025b582d4604557a747470;hp=0b9393ef0c67c975aa97b61a9c31315fc3b24bbc;hpb=783ffa4235330029d661752b1023db635b26f2b3;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/googlefight.rb b/data/rbot/plugins/googlefight.rb index 0b9393ef..894d2233 100755 --- a/data/rbot/plugins/googlefight.rb +++ b/data/rbot/plugins/googlefight.rb @@ -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{Results 1 - \d+ of(?: about)? ([\d,]+)}) + res = html.scan(%r{>About ([\d,]+) results}) res.to_s.tr(",", "").to_i end end