Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async def fetch(url):
- # Create HTTP session
- async with aiohttp.ClientSession() as session:
- # Make GET request using session
- async with session.get(url) as response:
- # Return text content
- return await response.text()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement