Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/core/utils.py
2021-02-07 00:30:13 +08:00

8 lines
242 B
Python

import aiohttp
async def get_url(url: str):
async with aiohttp.ClientSession() as session:
async with session.get(url, timeout=aiohttp.ClientTimeout(total=20)) as req:
text = await req.text()
return text