Beispiel #1
0
class Command(CrawlCommand):
    def syntax(self):
        return ""

    def short_desc(self):
        return "Run all spiders"

    def run(self, args, opts):
        self.scraper = Scraper(self.crawler)
        
        dispatcher.connect(self.engine_started, signal=signals.engine_started)

        self.crawler.start()

    def engine_started(self):
        self.scraper.run()
Beispiel #2
0
    def run(self, args, opts):
        self.scraper = Scraper(self.crawler)
        
        dispatcher.connect(self.engine_started, signal=signals.engine_started)

        self.crawler.start()