CA
secure-lavender
Does CheerioCrawler shares global state among its instances?
I implemented a class for creating CheerioCrawler and adding routers etc. and I extended this class to create specific implementations for various websites. When I run them it finishes after doing amount of max request that I set. Problem is it counts amount of max request for all the instances and stops after that, instead of handling instances seperately.
4 Replies
Someone will reply to you shortly. In the meantime, this might help:
secure-lavenderOP•6mo ago
fascinating-indigo•6mo ago
Hi @Hurby
You can create different request queue for every instance so that its state is independent
https://crawlee.dev/api/core/class/RequestQueue
RequestQueue | API | Crawlee · Build reliable crawlers. Fast.
Crawlee helps you build and maintain your crawlers. It's open source, but built by developers who scrape millions of pages every day for a living.
secure-lavenderOP•6mo ago
thanks!