feat: 将所有api请求更换为异步,提高速度

This commit is contained in:
helloplhm-qwq
2023-12-17 13:50:22 +08:00
parent 484adde934
commit 57977c82d2
7 changed files with 29 additions and 12 deletions

View File

@ -30,7 +30,7 @@ tools = {
async def url(songId, quality):
target_url = f'''https://bd-api.kuwo.cn/api/service/music/downloadInfo/{songId}?isMv=0&format={tools['extMap'][quality]}&br={tools['qualityMap'][quality]}'''
req = Httpx.request(target_url, {
req = await Httpx.AsyncRequest(target_url, {
'method': 'GET',
'headers': {
'User-Agent': 'okhttp/3.10.0',