then I do to start it:
const pdf_crawler = await createPDFCrawler(place.id,)
const web_crawler = await createWebCrawler(place.id, pdf_crawler)
console.log('Starting crawlers', place.name, place.id)
const requests = queuedRunDocument['urls'].map((url) => {
return new CrawleeRequest({
url: url,
userData: {
place: { name: place.name, id: place.id, url },
},
})
})
await web_crawler.addRequests(requests)
const web_promise = new Promise((resolve, reject) => {
web_crawler
.run()
.then(() => {
console.log('web crawler finished', place.id)
resolve(true)
})
.catch((e) => {
console.log('web crawler error', e)
reject(e)
})
})