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)