luojunhui 3 hónapja
szülő
commit
a3641c0280
1 módosított fájl, 1 hozzáadás és 1 törlés
  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