From: Matthias Hecker Date: Wed, 28 Jan 2009 19:47:00 +0000 (+0100) Subject: imdb plugin: fixed the ratings regex X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=810ada4dd1a8dfe894c90dfd135ac7b339864d21;hp=05852a3188a1811e2f5030c747d5a3add2ecd1c0;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git imdb plugin: fixed the ratings regex --- diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb index 0a878c75..bfe27369 100644 --- a/data/rbot/plugins/imdb.rb +++ b/data/rbot/plugins/imdb.rb @@ -165,7 +165,7 @@ class Imdb end ratings = "no votes" - m = /([0-9.]+)\/10<\/b>\n?\r?\s+\(([0-9,]+) votes?<\/a>\)<\/small>/.match(resp.body) + m = /([0-9.]+)\/10<\/b>\n?\r?\s+[^<]+]+>([0-9,]+) votes?<\/a>/.match(resp.body) if m ratings = "#{m[1]}/10 (#{m[2]} voters)" end