]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
imdb plugin: fixed the ratings regex
authorMatthias Hecker <apoc@sixserv.org>
Wed, 28 Jan 2009 19:47:00 +0000 (20:47 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 28 Jan 2009 20:01:47 +0000 (21:01 +0100)
data/rbot/plugins/imdb.rb

index 0a878c7516f8e112506bdc817ffd3958b1097cac..bfe27369c6b8ab8e87e02488a7f2f86d3f972fa2 100644 (file)
@@ -165,7 +165,7 @@ class Imdb
       end
 
       ratings = "no votes"
-      m = /<b>([0-9.]+)\/10<\/b>\n?\r?\s+<small>\(<a href="ratings">([0-9,]+) votes?<\/a>\)<\/small>/.match(resp.body)
+      m = /<b>([0-9.]+)\/10<\/b>\n?\r?\s+[^<]+<a href="ratings"[^>]+>([0-9,]+) votes?<\/a>/.match(resp.body)
       if m
         ratings = "#{m[1]}/10 (#{m[2]} voters)"
       end