Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #..
- async with aiohttp.ClientSession() as session:
- #..
- # Loop through URLs and append tasks
- for url in urls:
- tasks.append(fetch_page(session, url))
- # Group and Execute tasks concurrently
- htmls = await asyncio.gather(*tasks)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement