fix: 修复引入账号池后导致的bug

This commit is contained in:
helloplhm-qwq
2024-01-05 19:09:17 +08:00
parent 3f300833d3
commit 1690c9600c
4 changed files with 10 additions and 12 deletions

View File

@ -27,18 +27,17 @@ async def getMusicInfo(hash_, use_cache = True):
"User-Agent": "Android712-AndroidPhone-11451-376-0-FeeCacheUpdate-wifi",
"x-router": "kmr.service.kugou.com",
},
"data": {
"body": {
"area_code": "1",
"show_privilege": "1",
"show_album_info": "1",
"is_publish": "",
"appid": 1005,
"clientver": 11451,
"mid": tools.mid,
"mid": '114514',
"dfid": "-",
"clienttime": tn,
"key": 'OIlwlieks28dk2k092lksi2UIkp',
"fields": "",
"data": [
{
"hash": hash_
@ -48,7 +47,6 @@ async def getMusicInfo(hash_, use_cache = True):
'cache': 86400 * 30 if use_cache else 'no-cache',
'cache-ignore': [tn]
}
options['body'] = json.dumps(options['data']).replace(', ', ',').replace(': ', ':')
body = await Httpx.AsyncRequest(url, dict(options))
body = body.json()
return body['data'][0][0] if (body['data'] and body['data'][0]) else {}