Advertisement
dereksir

Untitled

Nov 22nd, 2023 (edited)
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. async def fetch(url):
  2.     # Create HTTP session
  3.     async with aiohttp.ClientSession() as session:
  4.         # Make GET request using session
  5.         async with session.get(url) as response:
  6.             # Return text content
  7.             return await response.text()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement