diff --git a/feeds/jobs-special.json b/feeds/jobs-special.json index 1b13977..df0a631 100644 --- a/feeds/jobs-special.json +++ b/feeds/jobs-special.json @@ -6,7 +6,7 @@ "filter_location", "filter_reject", "filter_md_jobs", - "filter_today_only" + "filter_last_week" ], "meta": { "title": "Jobs", @@ -70,22 +70,6 @@ "count": 100, "feed_url": "http://45.33.114.116:8080/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Fu3btnz8z2r.xml" }, - { - "count": 100, - "feed_url": "http://45.33.114.116:8080/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D33256062" - }, - { - "count": 100, - "feed_url": "http://45.33.114.116:8080/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D33450169" - }, - { - "count": 100, - "feed_url": "http://45.33.114.116:8080/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D34517029" - }, - { - "count": 100, - "feed_url": "http://45.33.114.116:8080/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D34888105" - }, { "count": 100, "feed_url": "http://45.33.114.116:8080/https%3A%2F%2Fwww.technojobs.co.uk%2Frss.php%2Fglasgow%2Fsearchtypeand%2FlocationScotland%2Fsortbyrelevant%2Fjobtypeall" diff --git a/plugins/filter_location.js b/plugins/filter_location.js index fdbc804..d79da64 100644 --- a/plugins/filter_location.js +++ b/plugins/filter_location.js @@ -1,7 +1,8 @@ module.exports = function (item, itemOptions, source) { - var patt = /(glasgow|london|edinburgh)/ig; - var result = patt.test(itemOptions.description); - var resultB = patt.test(itemOptions.title); - return (result||resultB === true) ? itemOptions : -1; + const patt = /(glasgow|london|edinburgh)/ig; + const result = patt.test(itemOptions.description); + const resultB = patt.test(itemOptions.title); + console.log('Location:', (result || resultB === true) ? 'Pass' : 'Reject'); + return (result || resultB === true) ? itemOptions : -1; }; diff --git a/plugins/filter_md_jobs.js b/plugins/filter_md_jobs.js index e00b61a..9fe38e8 100644 --- a/plugins/filter_md_jobs.js +++ b/plugins/filter_md_jobs.js @@ -3,6 +3,7 @@ module.exports = function (item, itemOptions, source) { const result = patt.test(itemOptions.description); const resultB = patt.test(itemOptions.title); + console.log('My Filter:', (result || resultB === true) ? 'Pass' : 'Reject'); return (result || resultB === true) ? itemOptions : -1 ; // console.log('>> Filter_md_jobs', (result||resultB === true)); // return itemOptions; diff --git a/plugins/filter_reject.js b/plugins/filter_reject.js index 3cefe3c..e678cdf 100644 --- a/plugins/filter_reject.js +++ b/plugins/filter_reject.js @@ -8,5 +8,7 @@ module.exports = function (item, itemOptions, source) { const result = patt.test(itemOptions.description) || engineers.test(itemOptions.description) || developers.test(itemOptions.description) || architects.test(itemOptions.description); const resultB = patt.test(itemOptions.title) || engineers.test(itemOptions.title) || developers.test(itemOptions.title) || architects.test(itemOptions.title); + console.log('Reject:', (result || resultB === true) ? 'Reject' : 'Pass'); + return (result || resultB === true) ? -1 : itemOptions; };