]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/imdb.rb
spotify: handle errors
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / imdb.rb
index bfe27369c6b8ab8e87e02488a7f2f86d3f972fa2..33e13b637295e8d5535337ed33e8b21897bdf3b5 100644 (file)
@@ -99,7 +99,7 @@ class Imdb
   end
 
   def grab_info(info, body)
-    /<div class="info">\s+<h5>#{info}:<\/h5>\s+(.*?)<\/div>/mi.match(body)[1] rescue nil
+    /<div (?:id="\S+-info" )?class="info">\s+<h5>#{info}:<\/h5>\s+(.*?)<\/div>/mi.match(body)[1] rescue nil
   end
 
   def fix_article(org_tit)
@@ -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