
1 bazingaterry 2017 年 7 月 4 日 via iPhone 结束的时候还有一个函数(一时之间想不起名字 |
2 ldbC5uTBj11yaeh5 2017 年 7 月 4 日 判断一下当前时间,超过上次记录时间比如 1 分钟的话,即使不足 500 条也写入。算是最简单的 workaround 了。 |
3 sikariba 2017 年 7 月 4 日 就用一楼的那个,收尾的时候再写一次。closed 函数。 https://docs.scrapy.org/en/latest/topics/spiders.html#scrapy.spiders.Spider.closed |
4 naomhan 2017 年 7 月 4 日 pipline 里有个 close_spider 可以在这里导出 |
5 1O 2017 年 7 月 4 日 都是,你看你都丑成啥样了。 |
6 360safe OP 谢谢大家,明白了,都怪自己没有细看官方文档。谢谢大家,学习成长了。 |