Explorar o código

修改time.time

luojunhui hai 3 meses
pai
achega
a3641c0280
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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