소스 검색

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

dongzhaorui 2 년 전
부모
커밋
b8d72569c1
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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 = []  # 待推送的心跳信息列表
 
         for parser in self._parsers:
-
             now_page = getattr(request, "page", -1)  # 当前访问页码
             extract_count = 0  # 列表抽取总数量
             task_count = 0  # 详情任务总数量
@@ -251,7 +250,7 @@ class PaserControl(threading.Thread):
                         # 发送心跳的条件
                         is_sent_heartbeat = True
                         # 抽取列表数量计数
-                        if hasattr(parser, "_extract_count"):
+                        if hasattr(parser, "__extract_count"):
                             extract_count += parser.get_extract_count()
                             parser.reset_extract_count()