summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2014-03-25 11:24:36 +0100
committerRobert Gerus <arachnist@i.am-a.cat>2014-03-25 11:24:36 +0100
commit950b70f0f65b898fc1b3b052a80a88948cb3c8ae (patch)
treef73d954f9920e33b1ce7dde1224d535756f365ad
parentd5a158b05ef61d40f2ad87909a9ea74b4b6b1f27 (diff)
downloadrepost-950b70f0f65b898fc1b3b052a80a88948cb3c8ae.tar.gz
repost-950b70f0f65b898fc1b3b052a80a88948cb3c8ae.tar.bz2
repost-950b70f0f65b898fc1b3b052a80a88948cb3c8ae.tar.xz
repost-950b70f0f65b898fc1b3b052a80a88948cb3c8ae.zip
Fix it one final time.
-rw-r--r--plugins/scrape.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/scrape.rb b/plugins/scrape.rb
index 3cc5ada..0e863d5 100644
--- a/plugins/scrape.rb
+++ b/plugins/scrape.rb
@@ -45,7 +45,7 @@ Client.register_trigger("PRIVMSG") do |msg|
url = Digest::MD5.hexdigest(word)
end
- title = Nokogiri::HTML(open(word).read(10240)).title().delete("\n")
+ title = Nokogiri::HTML(open(word).read(10240)).title().gsub(/[\s]+/, " ").strip
Scrape::Link.create(
:url => url,