Explorar o código

修改redis判重

maxiaoshan %!s(int64=3) %!d(string=hai) anos
pai
achega
140bc89262
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/spider/spider.go

+ 5 - 0
src/spider/spider.go

@@ -573,6 +573,11 @@ func (s *Spider) DownloadDetailItem(p interface{}, num *int) {
 	hashHref := HexText(href)
 	id := ""                    //记录spider_listdata中保存的数据id,便于下载成功后更新状态
 	if util.Config.Modal == 1 { //除7000、7500、7700节点外所有节点只采集列表页信息
+		isExist := util.RedisClusterExists(hashHref) //全量信息中已采集
+		if isExist {
+			*num++ //已采集
+			return
+		}
 		SaveHighListPageData(paramdata, s.SCode, hashHref, num)
 		return
 	} else {