scrapy scrapy debug 模式 from scrapy.cmdline import execute import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__))) execute(["scrapy","crawl","jobbole"]) settings设置中 # Obey robots.txt rules ROBOTSTXT_OBEY = False 就可以进行debug