Permalink
Browse files

imdb/imdb.rb

  • Loading branch information...
1 parent 9852aff commit d75806aedfd66401dcf43ec7f46fdc14c8e20f42 @mschrag mschrag committed Jul 23, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 imdb/imdb.rb
View
@@ -14,7 +14,7 @@ def self.find_movie_by_id(id)
movie = ImdbMovie.new
movie.imdb_id = id
- movie.title = coder.decode(data.at("meta[@name='title']")['content'].gsub(/\(\d\d\d\d\)/,'').strip)
+ movie.title = coder.decode(data.at("meta[@name='title']")['content'].gsub(/\((\d{4}(\/[^)]*)?|[A-Z]+)\)/,'').strip)
rating_text = (data/"div.rating/div.meta/b").inner_text
if rating_text =~ /([\d\.]+)\/10/

0 comments on commit d75806a

Please sign in to comment.