From 7defad2af6fdf7ff8d8b49f928daf254db7e2d78 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Wed, 17 Aug 2016 16:20:01 -0400 Subject: [PATCH] Added to check if url exists and to exit if it doesnt on article extractor --- lib/commands/extractArticle.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/commands/extractArticle.js b/lib/commands/extractArticle.js index dbd6e37..5303485 100644 --- a/lib/commands/extractArticle.js +++ b/lib/commands/extractArticle.js @@ -16,6 +16,9 @@ module.exports = new Command("ExtractArticle", condition, function(text, send, u } return false; }); + if (url == undefined) { + return; + } read(url, function(err, article, meta) { send(article.textBody); article.close()