|
@@ -271,17 +271,18 @@ func (s *Spider) DownListPageItem() (errs interface{}) {
|
|
|
if util.Config.IsHistoryEvent && s.GetVar("spiderType") == "history" { //7000节点,爬虫跑历史
|
|
|
max = s.GetIntVar("spiderHistoryMaxPage")
|
|
|
}
|
|
|
- downtimes := 0 //记录某页重试次数(暂定3次)
|
|
|
- repeatPageNum := 0 //记录列表页所有连接重复的页码
|
|
|
- repeatPageTimes := 0 //记录页码连续判重的次数(暂定连续判重页码数为5次时,不再翻页)
|
|
|
- repeatPageTimesLimit := 10 //记录页码连续判重的次数上线(高性能模式10页,队列模式5页)
|
|
|
- if util.Config.Working == 1 {
|
|
|
- repeatPageTimesLimit = 5
|
|
|
- }
|
|
|
+ downtimes := 0 //记录某页重试次数(暂定3次)
|
|
|
+ repeatPageNum := 0 //记录列表页所有连接重复的页码
|
|
|
+ repeatPageTimes := 0 //记录页码连续判重的次数(暂定连续判重页码数为5次时,不再翻页)
|
|
|
+ repeatPageTimesLimit := 10 //记录页码连续判重的次数上线(高性能模式10页,队列模式5页)
|
|
|
isRunRepeatList := false //是否执行列表页连续判重
|
|
|
if util.Config.Modal == 1 && max > 1 && max < 101 { //除顺序采集模式外所有节点,采集列表页时进行连续10页判重
|
|
|
isRunRepeatList = true
|
|
|
- max = 100 //设置最大页为100
|
|
|
+ max = 100 //高性能模式设置最大页为100
|
|
|
+ if util.Config.Working == 1 { //队列模式
|
|
|
+ repeatPageTimesLimit = 3 //连续判重页3
|
|
|
+ max = 50 //队列模式最大页50
|
|
|
+ }
|
|
|
}
|
|
|
for ; start <= max && !s.Stop; start++ {
|
|
|
if !s.Stop { //在下载详情页时爬虫下架,此时不再存心跳信息
|