From cb6a6be33872b67221ec23ad508da4ff09b011f7 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Mon, 18 Apr 2016 14:13:59 +0100 Subject: [PATCH] updated plugins and removed a couple of broken feeds --- .idea/workspace.xml | 66 +++++++++++----------- node_modules/rss-braider/lib/RssBraider.js | 3 +- plugins/fix_images.js | 7 +-- plugins/fix_scripts.js | 4 +- 4 files changed, 41 insertions(+), 39 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 980a387..eac25e8 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,14 +3,9 @@ - - - - - - - - + + + @@ -67,17 +62,17 @@ - + - + - + @@ -93,7 +88,7 @@ - + @@ -473,7 +468,7 @@ - + 1438335954140 @@ -776,11 +771,18 @@ - - @@ -790,7 +792,7 @@ - + @@ -1192,22 +1194,6 @@ - - - - - - - - - - - - - - - - @@ -1216,5 +1202,21 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/rss-braider/lib/RssBraider.js b/node_modules/rss-braider/lib/RssBraider.js index eb8c2c6..3ad04c9 100644 --- a/node_modules/rss-braider/lib/RssBraider.js +++ b/node_modules/rss-braider/lib/RssBraider.js @@ -93,6 +93,7 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback) req.on('response', function (res) { var stream = this; if (res.statusCode !== 200) { + console.error(source); return this.emit('error', 'Bad status code: ' + res.statusCode); } stream.pipe(feedparser); @@ -294,4 +295,4 @@ RssBraider.prototype.date_sort = function(articles_arr) { return sorted_articles; }; -module.exports = RssBraider; \ No newline at end of file +module.exports = RssBraider; diff --git a/plugins/fix_images.js b/plugins/fix_images.js index 816a6ac..c54eb47 100644 --- a/plugins/fix_images.js +++ b/plugins/fix_images.js @@ -1,10 +1,9 @@ module.exports = function (item, itemOptions, source) { //console.log(itemOptions); // console.log((typeof itemOptions.descriptions !== 'undefined') && (itemOptions.description !== null)); - if ((typeof itemOptions.descriptions !== 'undefined') && (itemOptions.description !== null)) { - var match = itemOptions.description.replace(/\ssrc=/gi, - ' src="assets/fm.png" data-src='); + //if ((typeof itemOptions.descriptions !== 'undefined') && (itemOptions.description !== null)) { + var match = itemOptions.description.replace(/\ssrc=/gi, ' src="assets/fm.png" data-src='); itemOptions.description = match; - } + //} return itemOptions; }; diff --git a/plugins/fix_scripts.js b/plugins/fix_scripts.js index d97a00d..13cda3e 100644 --- a/plugins/fix_scripts.js +++ b/plugins/fix_scripts.js @@ -1,5 +1,5 @@ module.exports = function (item, itemOptions, source) { - if ((typeof itemOptions.descriptions !== 'undefined') && (itemOptions.description !== null)) { + //if ((typeof itemOptions.descriptions !== 'undefined') && (itemOptions.description !== null)) { var match = itemOptions.description.replace( /)<[^<]*)*<\/script>/gi, @@ -7,7 +7,7 @@ module.exports = function (item, itemOptions, source) { match = match.replace(/)<[^<]*)*<\/iframe>/gi, ''); itemOptions.description = match; - } + //} return itemOptions; };