/** * Created by WebStorm. * User: martin * Date: 22/05/2020 * Time: 21:01 */ /** * 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 RssS1Jobs = require('../scrapers/rss.s1jobs'); const s1jobsScraper = new RssS1Jobs(); const feed = fs.readFileSync('test/data/s1jobs/m7dp711z2r.xml'); test.test('Test Jobserve scraper', async t => { await s1jobsScraper.setStartUrl(url); s1jobsScraper.reduceItems(); await s1jobsScraper.filterAdverts(); await s1jobsScraper.addToDB(); t.end(); }); /* await s1jobsScraper.go('http://www.s1jobs.com/xml/m7dp711z2r.xml'); await s1jobsScraper.go('http://www.s1jobs.com/xml/pfvf7o7z2r.xml'); await s1jobsScraper.go('http://www.s1jobs.com/xml/lluqnt8z2r.xml'); await s1jobsScraper.go('http://www.s1jobs.com/xml/tu33qt8z2r.xml'); await s1jobsScraper.go('http://www.s1jobs.com/xml/u3btnz8z2r.xml'); await s1jobsScraper.go('http://www.s1jobs.com/xml/b1d7e6c3a9a11964z3r.xml'); await s1jobsScraper.go('http://www.s1jobs.com/xml/ddeded091b6f6d33z3r.xml'); */