3
0
chenjunhao 3 veckor sedan
förälder
incheckning
76612bf4ec
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      start_run_yaoshibang_v2.py

+ 2 - 2
start_run_yaoshibang_v2.py

@@ -48,7 +48,7 @@ def _build_task_dict(api_task, device_id, account_password, account_name, schedu
         "product_brand": api_task.get("product_brand", ""),
         "product_keyword": api_task.get("product_keyword", ""),
         "current_page": current_page,
-        "start_offset": api_task.get("start_offset", 0),
+        "start_offset": api_task.get("start_offset"),
         # 兼容旧字段
         "start_page": start_page,
         "end_page": 0,
@@ -117,7 +117,7 @@ def run_one_task(scheduler, device_id, account_password, account_name):
 
     # 根据 snapshot_collect_status 决定走普通爬虫还是快照爬虫
     snapshot_status = task_dict.get("snapshot_collect_status", 0)
-    if snapshot_status == 0:
+    if not snapshot_status:
         spider_cls = YaoShiBangSnapshot
         logger.info("任务 %s 启用快照模式", task_id)
     else: