在scrapy项目中写一个定时爬虫的程序main.py ,直接放在scrapy的存储代码的目录中就能设定时间定时多次执行。
main.py
import time import os while True: os.system("scrapy crawl News") time.sleep(86400) #每隔一天运行一次 24*60*60=86400s
python实现scrapy定时执行爬虫
原文:https://www.cnblogs.com/1061321925wu/p/12275127.html