From b102d281d8bb7fb28f8b31fec983d56452edbd24 Mon Sep 17 00:00:00 2001 From: Matthias -apoc- Hecker Date: Mon, 26 Sep 2011 14:44:25 +0200 Subject: imdb plugin: again fixes outdated ratings pattern --- data/rbot/plugins/imdb.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'data/rbot/plugins') diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb index 05333dcc..0f4b8c80 100644 --- a/data/rbot/plugins/imdb.rb +++ b/data/rbot/plugins/imdb.rb @@ -175,9 +175,13 @@ class Imdb end ratings = "no votes" - m = resp.body.match(/Users rated this ([0-9.]+)\/10 \(([0-9,]+) votes\)/m) - if m - ratings = "#{m[1]}/10 (#{m[2]} voters)" + # parse imdb rating value: + if resp.body.match(/itemprop="ratingValue">([^<]+)([^<]+)