]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/imdb.rb
remove whitespace
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / imdb.rb
index 2fde6cb1e1e77ab9621966104d4b224d60c815e9..f3e6504dc617e4d507f2bee78303509a08a1a906 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
@@ -206,7 +206,7 @@ class Imdb
       name = m[1]
 
       info << "#{name}"
-      info << " : http://www.imdb.com#{sr}" unless opts[:nourl]
+      info.last << " : http://www.imdb.com#{sr}" unless opts[:nourl]
 
       return info if opts[:name_only]
 
@@ -469,7 +469,7 @@ class ImdbPlugin < Plugin
   end
 
   # Find the movies with a participation of :who in the year :year
-  # TODO: allow year to be either a year or a decade ('[in the] 1960s') 
+  # TODO: allow year to be either a year or a decade ('[in the] 1960s')
   #
   def movies(m, params)
     who = params[:who].to_s