yet another small fix.
parent
1ac5354843
commit
29093d92b7
|
@ -45,7 +45,8 @@ Client.register_trigger("PRIVMSG") do |msg|
|
||||||
url = Digest::MD5.hexdigest(word)
|
url = Digest::MD5.hexdigest(word)
|
||||||
end
|
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(
|
Scrape::Link.create(
|
||||||
:url => url,
|
:url => url,
|
||||||
|
|
Loading…
Reference in New Issue