Allow the subscription to multiple news feeds in one newsfeed instance.

This commit is contained in:
Michael Teeuw
2016-04-20 14:39:38 +02:00
parent 3b1f1a41dc
commit fd500ac411
5 changed files with 192 additions and 45 deletions

View File

@@ -46,11 +46,13 @@ var Fetcher = function(url, reloadInterval, encoding) {
var regex = /(<([^>]+)>)/ig;
description = description.replace(regex, "");
items.push({
title: item.title,
description: description,
pubdate: item.pubdate,
});
if (item.title && description && item.pubdate) {
items.push({
title: item.title,
description: description,
pubdate: item.pubdate,
});
}
});
parser.on("end", function() {