Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function scrape(job: Job, done: DoneCallback) {
try {
const { url, contract } = job.data
return new Scraper(url, contract, { 'stephane-link': stephaneLink }).scrapePage()
.then((results: any[]) => done(null, results))
.catch((e: Error) => done(e))
} catch (e) {
done(e)
}
}