scrapy/scrapy/commands/list.py

14 lines
312 B
Python

from scrapy.command import ScrapyCommand
class Command(ScrapyCommand):
requires_project = True
default_settings = {'LOG_ENABLED': False}
def short_desc(self):
return "List available spiders"
def run(self, args, opts):
for s in self.crawler.spiders.list():
print s