list.py 374 B

1234567891011121314
  1. from __future__ import print_function
  2. from scrapy.commands import ScrapyCommand
  3. class Command(ScrapyCommand):
  4. requires_project = True
  5. default_settings = {'LOG_ENABLED': False}
  6. def short_desc(self):
  7. return "List available spiders"
  8. def run(self, args, opts):
  9. for s in sorted(self.crawler_process.spider_loader.list()):
  10. print(s)