From abd11834ae899c05e740bcf3b8ff23ef4c3de313 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Fri, 29 Jun 2018 08:51:37 +0100 Subject: [PATCH] updated feeds --- feeds/jobs-special.json | 3 +-- gather.js | 9 ++++++++- plugins/filter_md_jobs.js | 7 ++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/feeds/jobs-special.json b/feeds/jobs-special.json index 1b13977..76ef5dd 100644 --- a/feeds/jobs-special.json +++ b/feeds/jobs-special.json @@ -5,8 +5,7 @@ "plugins": [ "filter_location", "filter_reject", - "filter_md_jobs", - "filter_today_only" + "filter_md_jobs" ], "meta": { "title": "Jobs", diff --git a/gather.js b/gather.js index 84089ba..62c4f21 100644 --- a/gather.js +++ b/gather.js @@ -122,6 +122,13 @@ async function main() { // await gatherXML('jobsLocal','jobs-local'); } +function test() { + gatherV2('jobsSpecial', 'jobs-special', 'rss').then((d) => { + logger.debug(d); + }).catch((e) => { + logger.error(e); + }); +} function tick() { const extra = Math.floor((Math.random() * 60) + 1) * 1000; main(); @@ -138,5 +145,5 @@ function tick() { () => tick(), toHour() ); - main(); + // test(); })(); diff --git a/plugins/filter_md_jobs.js b/plugins/filter_md_jobs.js index e1e64c6..1aee9be 100644 --- a/plugins/filter_md_jobs.js +++ b/plugins/filter_md_jobs.js @@ -1,7 +1,8 @@ module.exports = function (item, itemOptions, source) { - var patt = /(full\w?stack|html|html5|css|javascript|sql|node|backbone|git|gulp|jquery|express|£\dk|Data Warehouse Developer|iot|internet of things)\W/ig; + var patt = /(full\w?stack|html|html5|es6|react|css|javascript|sql|node|backbone|git|gulp|jquery|express|£\dk|Data Warehouse Developer|iot|internet of things)\W/ig; var result = patt.test(itemOptions.description); var resultB = patt.test(itemOptions.title); - return (result||resultB === true) ? itemOptions : -1 ; - + // return (result||resultB === true) ? itemOptions : -1 ; + // console.log('>> Filter_md_jobs', (result||resultB === true)); + return itemOptions; };