like-gold•3y ago
How to scrap emails to one level of nesting and give results to API
The main question probably is how to send the answer correctly and not save the data in the Dataset. For example with the same express.
3 Replies
I'm not sure what exactly you are asking about. You can scrape all pages in level 1 depth by enqueueing all 'a[href]' elements from the home page and then using https://crawlee.dev/api/utils/namespace/social#emailsFromText
like-goldOP•3y ago
I went here such a scraper I do not know how well it is right 🙂
I also have to implement the return of data to the request, but I do not know how to do it correctly.
There is an idea to replace
await Dataset.pushData({ handles, url: request.url });
on something like this res.json({ handles, url: request.url })
. That is, inside the requestHandler()
.
Another idea
The last idea looks good, does it do what you need?