/** * Created by WebStorm. * User: martin * Date: 24/05/2020 * Time: 23:04 */ const MasterRSS = require('../lib/rss'); class RssTechnojobs extends MasterRSS { constructor() { super(); this.siteurl = 'www.technojobs.co.uk'; this.siteid = 'technojobs'; this.useStone = false; this.requestOptions = { 'url' : '' }; this.guidRegex = /\/(\d+)/; this.imgRegex = /src="(.+?)"/g; this.locationRegEx = /Location:(.*?)? { return `src="${this.makeImg(part)}"`; }); if (location !== null) { const _location = location[1].trim(); if (_location.length <= 30) newObj.location = _location; } if (rate !== null) newObj.salary = rate[1].trim().slice(0, 55); if (id !== null) newObj.id = id[1].trim(); newObj.title = item.title; newObj.postDate = item.isoDate; newObj.url = item.link; newObj.summary = _content; /* console.log(newObj); console.log('-- reduce'); */ return newObj; } async go(url) { await super.go(); this.setStartUrl(url); await this.processFeed(); } } module.exports = RssTechnojobs;