From f0b8672c89d28a6f4cf8af90192562b688b5000b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Fri, 23 Feb 2018 10:44:51 +0100 Subject: [PATCH] Silly me. (bis) --- crawl/crawl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crawl/crawl.py b/crawl/crawl.py index ab3b8e1..6eb748c 100644 --- a/crawl/crawl.py +++ b/crawl/crawl.py @@ -162,7 +162,7 @@ class CrawlingThread(Thread): def run(self): tasks = [] #tasks.append(async_crawler("http://plus.google.com/+Python")) - tasks.append(async_print('https://python.org/')) + tasks.append(async_crawler('https://python.org/')) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) @@ -209,7 +209,7 @@ async def async_print(url): async def async_crawler(url): queue = [url] crawled = [] - while queue or (len(crawled) < HARD_LIMIT): + while queue and (len(crawled) < HARD_LIMIT): async with aiohttp.ClientSession() as session: try: url = queue.pop(0)