我一直在使用stackoverflow(https://stackoverflow.com/a/43661172/5037146)上描述的方法,使用Crawler Runner从脚本运行scrapy,以允许重新启动进程。你知道吗
但是,当通过CrawlerRunner运行进程时,我没有得到任何控制台日志,而当我使用CrawlerProcess时,它会输出状态和进度。你知道吗
在线提供代码:https://colab.research.google.com/drive/14hKTjvWWrP--h_yRqUrtxy6aa4jG18nJ
使用
CrawlerRunner
您需要手动设置日志记录,这可以通过configure_logging()
完成。见https://docs.scrapy.org/en/latest/topics/practices.html#run-scrapy-from-a-script相关问题 更多 >
编程相关推荐