ソースを参照

修改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