From 29093d92b7cfd9531d167a1b7c990bc7632ecbeb Mon Sep 17 00:00:00 2001 From: Robert Gerus Date: Tue, 25 Mar 2014 18:02:51 +0100 Subject: [PATCH] yet another small fix. --- plugins/scrape.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/scrape.rb b/plugins/scrape.rb index 15a4429..0a2f92a 100644 --- a/plugins/scrape.rb +++ b/plugins/scrape.rb @@ -45,7 +45,8 @@ Client.register_trigger("PRIVMSG") do |msg| url = Digest::MD5.hexdigest(word) end - title = Nokogiri::HTML(open(word).read(10240)).title().gsub(/[\s]+/, " ").strip + title = Nokogiri::HTML(open(word).read(10240)).title() + title = title.gsub(/[\s]+/, " ").strip if not title.nil? Scrape::Link.create( :url => url,