/** * Created by WebStorm. * User: martin * Date: 22/05/2020 * Time: 12:18 */ const tape = require('tape'); const _test = require('tape-promise').default; // <---- notice 'default' const test = _test(tape); // decorate tape const fs = require('fs'); const cheerio = require('cheerio'); const JobserveScraper = require('../scrapers/rss.jobserve'); const jobserveScraper = new JobserveScraper(); const feed = fs.readFileSync('test/data/jobserve/74C7C106F0D8ADE9.rss'); test.test('Test Jobserve scraper', async t => { // await jobserveScraper.go('https://www.jobserve.com/MySearch/49403B7B37C2EA61.rss'); /* await jobserveScraper.go('https://www.jobserve.com/MySearch/BAEBF3BDF82B8FEF.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/9BCBF25C586A0E3F.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/F3A56475D5FD4966.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/4E2AC50E02AD128B.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/6DA9769BA89834AA.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/EDF47BEA6B31EF.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/3CAD044BEF2BFA.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/C7B25D86D0844A.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/64A3EEF615FA4C.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/6FC7E9ED5F042ECB.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/CA49421A86CA3F74.rss'); await jobserveScraper.go('https://www.jobserve.com/MySearch/846CDA8658FF93A3.rss');*/ await jobserveScraper.loadFeed(feed); /* jobserveScraper.reduceItems(); await jobserveScraper.filterAdverts(); */ // await jobserveScraper.addToDB(); t.end(); });