]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
imdb: fix for missing director
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 2 Apr 2009 14:12:51 +0000 (16:12 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 2 Apr 2009 14:12:51 +0000 (16:12 +0200)
Director information was missing because IMDB had changed its 'info' div
box to include an id. Cope with it.

data/rbot/plugins/imdb.rb

index f3e6504dc617e4d507f2bee78303509a08a1a906..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)