Browse Source

xng快速扫描

罗俊辉 1 year ago
parent
commit
950fae0438
1 changed files with 2 additions and 1 deletions
  1. 2 1
      spider/crawler_author/xiaoniangao.py

+ 2 - 1
spider/crawler_author/xiaoniangao.py

@@ -299,7 +299,8 @@ async def periodic_task():
     while True:
         rule = get_task_rule()
         await run_spider(rule_dict=rule)  # 直接在当前事件循环中运行异步任务
-        await asyncio.sleep(30 * 60)  # 等待30分钟
+        wait_time = random.randint(20 * 60, 40 * 60)
+        await asyncio.sleep(wait_time)  # 随机等待 20-40min
 
 
 async def main():