]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
imdb: fix plot detection
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 24 Jul 2010 21:29:14 +0000 (23:29 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 24 Jul 2010 21:29:14 +0000 (23:29 +0200)
data/rbot/plugins/imdb.rb

index 6e3ec53047fd8fa53fe9c90bd7317a08f9b00ade..7ffd2df8fe0a8da29e25e67d08b488b8c735dcfb 100644 (file)
@@ -176,9 +176,9 @@ class Imdb
       end
 
       plot = nil
-      data = grab_info(/Plot (?:Outline|Summary)/, resp.body)
+      data = grab_info(/Plot(?: (?:Outline|Summary))?/, resp.body)
       if data
-        plot = "Plot: " + data.ircify_html.gsub(/\s+more$/,'')
+        plot = "Plot: " + data.ircify_html.gsub(/\s+more\s*$/,'').gsub(/\s+Full summary » \| Full synopsis »\s*$/,'')
       end
 
       info << ["Ratings: " << ratings, "Genre: " << genre.join('/') , plot].compact.join(". ")