Skip to content

Commit 2fbaf86

Browse files
author
littlelory
committed
python/autohome_spider:添加重试配置
1 parent 1da2a78 commit 2fbaf86

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

python/autohome_spider/autohome_spider/settings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@
2828
# 日志级别
2929
LOG_LEVEL = 'INFO'
3030
# 日志文件路径
31-
LOG_FILE = 'scrapy.log'
31+
LOG_FILE = 'scrapy.log'
32+
33+
# 开启重试
34+
RETRY_ENABLED = True
35+
# 重试次数
36+
RETRY_TIMES = 3

0 commit comments

Comments
 (0)