在项目setting同级目录下创建py文件,代码如下:
from scrapy.cmdline import execute import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__))) execute(["scrapy","crawl","bole_articles"])
调试运行该文件即可