From ae151059610cf9a9c0e365bebc22b084c054349c Mon Sep 17 00:00:00 2001 From: Robert Gerus Date: Thu, 13 Mar 2014 15:03:13 +0100 Subject: [PATCH] get only the first line of title. --- plugins/scrape.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scrape.rb b/plugins/scrape.rb index bed7b0c..fca01cb 100644 --- a/plugins/scrape.rb +++ b/plugins/scrape.rb @@ -42,7 +42,7 @@ Client.register_trigger("PRIVMSG") do |msg| url = Digest::MD5.hexdigest(word) end - title = Nokogiri::HTML(open(word).read).title() + title = Nokogiri::HTML(open(word).read).title().split(/\n/)[0] Scrape::Link.create( :url => url,