lib/imdb.rb in pirate-autonzb-0.2.4 vs lib/imdb.rb in pirate-autonzb-0.3
- old
+ new
@@ -32,10 +32,10 @@
private
def set_doc
if link
- @doc = Hpricot(open(link.gsub(/\/$/,'')))
+ @doc = Hpricot(open(link.gsub(/\/\s*$/,'')))
else
query = "#{@name} (#{@year})"
search_url = "http://www.imdb.com/find?q=#{CGI::escape(query)}"
doc = Hpricot(open(search_url))
case doc.search("title").inner_html
\ No newline at end of file