I have several different spiders and want to launch them right away. Based on this and this , I can run multiple spiders in the same process. However, I do not know how to create a signal system to stop the reactor when all the spiders are finished.
I tried:
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
and
crawler.signals.connect(reactor.stop, signal=signals.spider_idle)
In both cases, the reactor stops when the first tracked mechanism is closed. Of course, I want the reactor to stop after all spiders have completed.
Can someone show me how to do the trick?
user3136452
source
share