Open bogusfocused opened 7 years ago
To create a promise out of crawl method we require a finish event with error.
asyncCrawl() { return new Promise((resolve, reject) => { this.crawler.on('finish', function (err) { if(!err) resolve(); else reject(err) }); this.crawler.crawl(); }) }
To create a promise out of crawl method we require a finish event with error.