浏览代码

修改time.time

luojunhui 3 月之前
父节点
当前提交
a3641c0280
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      applications/tasks/crawler_tasks/crawler_toutiao.py

+ 1 - 1
applications/tasks/crawler_tasks/crawler_toutiao.py

@@ -178,7 +178,7 @@ class CrawlerToutiao(CrawlerPipeline, CrawlerToutiaoConst):
                     raise Exception(f"crawler each info failed: {e}")
 
             if has_more:
-                time.sleep(self.SLEEP_SECOND)
+                await asyncio.sleep(self.SLEEP_SECOND)
             else:
                 break