Advertisement
dereksir

Untitled

Nov 23rd, 2023 (edited)
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. #..
  2.     async with aiohttp.ClientSession() as session:
  3.    
  4.     #..
  5.  
  6.         # Loop through URLs and append tasks
  7.         for url in urls:
  8.             tasks.append(fetch_page(session, url))
  9.  
  10.         # Group and Execute tasks concurrently
  11.         htmls = await asyncio.gather(*tasks)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement