Browse Source

fixbug: 更正抽取列表类属性错误

dongzhaorui 2 years ago
parent
commit
b8d72569c1
1 changed files with 1 additions and 2 deletions
  1. 1 2
      FworkSpider/feapder/core/parser_control.py

+ 1 - 2
FworkSpider/feapder/core/parser_control.py

@@ -81,7 +81,6 @@ class PaserControl(threading.Thread):
         heartbeat_lst = []  # 待推送的心跳信息列表
         heartbeat_lst = []  # 待推送的心跳信息列表
 
 
         for parser in self._parsers:
         for parser in self._parsers:
-
             now_page = getattr(request, "page", -1)  # 当前访问页码
             now_page = getattr(request, "page", -1)  # 当前访问页码
             extract_count = 0  # 列表抽取总数量
             extract_count = 0  # 列表抽取总数量
             task_count = 0  # 详情任务总数量
             task_count = 0  # 详情任务总数量
@@ -251,7 +250,7 @@ class PaserControl(threading.Thread):
                         # 发送心跳的条件
                         # 发送心跳的条件
                         is_sent_heartbeat = True
                         is_sent_heartbeat = True
                         # 抽取列表数量计数
                         # 抽取列表数量计数
-                        if hasattr(parser, "_extract_count"):
+                        if hasattr(parser, "__extract_count"):
                             extract_count += parser.get_extract_count()
                             extract_count += parser.get_extract_count()
                             parser.reset_extract_count()
                             parser.reset_extract_count()