]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/imdb.rb
quiz: stop quizzes and timers on cleanup
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / imdb.rb
index f0497c0b503e55448f235614cc3aa9dc486db25d..e1209124252026450909a42df81c7e9499913b0c 100644 (file)
@@ -143,7 +143,8 @@ class Imdb
       title_date = m[1].ircify_html
       debug title_date
       # note that the date dash for series is a - (ndash), not a - (minus sign)
-      pre_title, extra, date, junk = title_date.scan(/^(.*)\((.+?\s+)?(\d\d\d\d(?:–(?:\d\d\d\d)?)?(?:\/[IV]+)?)\)\s*(.+)?$/).first
+      # also, the second date, if missing, is an no-break space
+      pre_title, extra, date, junk = title_date.scan(/^(.*)\((.+?\s+)?(\d\d\d\d(?:–(?:\d\d\d\d| )?)?(?:\/[IV]+)?)\)\s*(.+)?$/).first
       extra.strip! if extra
       pre_title.strip!
       title = fix_article(pre_title)
@@ -308,8 +309,8 @@ class Imdb
       }
     end
 
-    urls.map { |url|
-      info = info_name(url, :movies_by_year => true)
+    urls.map { |u|
+      info = info_name(u, :movies_by_year => true)
 
       debug info.inspect