首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
scrapy主动触发关闭爬虫
scrapy主动触发关闭爬虫
mac
2022-06-30
23
在spider中时在方法里直接写
self
.crawler.engine.close_spider(
self
,
'cookie失效关闭爬虫'
)
在pipeline和downloaderMiddlewares里
spider.crawler.engine.close_spider(spider,
'没有新数据关闭爬虫'
)
转载于:https://www.cnblogs.com/c-x-a/p/9758493.html
相关资源:JAVA上百实例源码以及开源项目
转载请注明原文地址: https://mac.8miu.com/read-67481.html
最新回复
(
0
)