summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2014-03-25 18:02:51 +0100
committerRobert Gerus <arachnist@i.am-a.cat>2014-03-25 18:02:51 +0100
commit29093d92b7cfd9531d167a1b7c990bc7632ecbeb (patch)
treec5f6f98c5f2dcd6d53820c1e225cf8fa4a5575c3
parent1ac5354843b7c778fe8e7eed99f4adf4f7913fe8 (diff)
downloadrepost-29093d92b7cfd9531d167a1b7c990bc7632ecbeb.tar.gz
repost-29093d92b7cfd9531d167a1b7c990bc7632ecbeb.tar.bz2
repost-29093d92b7cfd9531d167a1b7c990bc7632ecbeb.tar.xz
repost-29093d92b7cfd9531d167a1b7c990bc7632ecbeb.zip
yet another small fix.
-rw-r--r--plugins/scrape.rb3
1 files changed, 2 insertions, 1 deletions
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,