mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-27 09:55:05 +08:00
16 lines
280 B
Python
16 lines
280 B
Python
|
from aiohttp import ClientSession
|
||
|
|
||
|
|
||
|
async def simple_get(url: str) -> str:
|
||
|
"""
|
||
|
简单异步get请求
|
||
|
Args:
|
||
|
url:
|
||
|
|
||
|
Returns:
|
||
|
|
||
|
"""
|
||
|
async with ClientSession() as session:
|
||
|
async with session.get(url) as resp:
|
||
|
return await resp.text()
|