X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fimdb.rb;h=e1209124252026450909a42df81c7e9499913b0c;hb=052217de30c59206d7025b582d4604557a747470;hp=f0497c0b503e55448f235614cc3aa9dc486db25d;hpb=0e6e5a51ab7485459e6864377456498756d15669;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb index f0497c0b..e1209124 100644 --- a/data/rbot/plugins/imdb.rb +++ b/data/rbot/plugins/imdb.rb @@ -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