From 3e5c1cd94bdcab96ff599dfc4108cd9d361c28ec Mon Sep 17 00:00:00 2001 From: ikun0014 Date: Wed, 18 Dec 2024 19:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=A0=E5=A5=BD=E4=BB=8A=E5=B9=B4=E6=98=AF?= =?UTF-8?q?=E5=93=AA=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/tx/player.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/tx/player.py b/modules/tx/player.py index 669eaec..8e3d2bf 100644 --- a/modules/tx/player.py +++ b/modules/tx/player.py @@ -46,22 +46,22 @@ async def url(songId, quality): return await vkeyUrl(songId, quality, infoBody) user_info = config.read_config('module.tx.user') if (not variable.use_cookie_pool) else random.choice(config.read_config('module.cookiepool.tx')) requestBody = { - 'req_0': { - 'module': 'vkey.GetVkeyServer', - 'method': 'CgiGetVkey', - 'param': { - 'filename': [f"{tools.fileInfo[quality]['h']}{strMediaMid}{tools.fileInfo[quality]['e']}"], - 'guid': config.read_config('module.tx.vkeyserver.guid'), - 'songmid': [songId], - 'songtype': [0], - 'uin': str(user_info['uin']), - 'loginflag': 1, - 'platform': '20', + "req": { + "module": "music.vkey.GetVkey", + "method": "UrlGetVkey", + "param": { + "filename": [f"{tools.fileInfo[quality]['h']}{strMediaMid}{tools.fileInfo[quality]['e']}"], + "guid": config.read_config("module.tx.vkeyserver.guid"), + "songmid": [songId], + "songtype": [0], + "uin": str(user_info["uin"]), + "loginflag": 1, + "platform": "20", }, }, - 'comm': { - "qq": str(user_info['uin']), - "authst": user_info['qqmusic_key'], + "comm": { + "qq": str(user_info["uin"]), + "authst": user_info["qqmusic_key"], "ct": "26", "cv": "2010101", "v": "2010101" @@ -69,7 +69,7 @@ async def url(songId, quality): } req = await signRequest(requestBody) body = createObject(req.json()) - data = body.req_0.data.midurlinfo[0] + data = body.req.data.midurlinfo[0] url = data['purl'] if (not url):