summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorMatthias -apoc- Hecker <apoc@sixserv.org>2011-08-14 13:50:02 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-28 23:29:11 +0200
commite64e9252e6b04de7de3509c2da2535bc3a18b280 (patch)
treedf9b92a1d768770da57cc5158ae30795ea120917 /data/rbot
parent33c582acdb8c57f302145fc3dc01a1bf2d7c8478 (diff)
fix for imdb, changed patterns for ratings&genre
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/imdb.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb
index e1209124..05333dcc 100644
--- a/data/rbot/plugins/imdb.rb
+++ b/data/rbot/plugins/imdb.rb
@@ -175,13 +175,13 @@ class Imdb
end
ratings = "no votes"
- m = resp.body.match(/<b>([0-9.]+)<\/b><span [^>]+>\/10<\/span><\/span>\s*[^<]+<a\s+[^>]*href="ratings"[^>]+>([0-9,]+) votes?<\/a>/m)
+ m = resp.body.match(/Users rated this ([0-9.]+)\/10 \(([0-9,]+) votes\)/m)
if m
ratings = "#{m[1]}/10 (#{m[2]} voters)"
end
genre = Array.new
- resp.body.scan(/<a href="\/genre\/[^"]+">([^<]+)<\/a>/) do |gnr|
+ resp.body.scan(/<a href="\/genre\/[^"]+"[^>]+>([^<]+)<\/a>/) do |gnr|
genre << gnr
end