你好今年是哪年

This commit is contained in:
ikun0014 2024-12-18 19:55:02 +08:00 committed by GitHub
parent 3375f0beba
commit 3e5c1cd94b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,22 +46,22 @@ async def url(songId, quality):
return await vkeyUrl(songId, quality, infoBody) 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')) user_info = config.read_config('module.tx.user') if (not variable.use_cookie_pool) else random.choice(config.read_config('module.cookiepool.tx'))
requestBody = { requestBody = {
'req_0': { "req": {
'module': 'vkey.GetVkeyServer', "module": "music.vkey.GetVkey",
'method': 'CgiGetVkey', "method": "UrlGetVkey",
'param': { "param": {
'filename': [f"{tools.fileInfo[quality]['h']}{strMediaMid}{tools.fileInfo[quality]['e']}"], "filename": [f"{tools.fileInfo[quality]['h']}{strMediaMid}{tools.fileInfo[quality]['e']}"],
'guid': config.read_config('module.tx.vkeyserver.guid'), "guid": config.read_config("module.tx.vkeyserver.guid"),
'songmid': [songId], "songmid": [songId],
'songtype': [0], "songtype": [0],
'uin': str(user_info['uin']), "uin": str(user_info["uin"]),
'loginflag': 1, "loginflag": 1,
'platform': '20', "platform": "20",
}, },
}, },
'comm': { "comm": {
"qq": str(user_info['uin']), "qq": str(user_info["uin"]),
"authst": user_info['qqmusic_key'], "authst": user_info["qqmusic_key"],
"ct": "26", "ct": "26",
"cv": "2010101", "cv": "2010101",
"v": "2010101" "v": "2010101"
@ -69,7 +69,7 @@ async def url(songId, quality):
} }
req = await signRequest(requestBody) req = await signRequest(requestBody)
body = createObject(req.json()) body = createObject(req.json())
data = body.req_0.data.midurlinfo[0] data = body.req.data.midurlinfo[0]
url = data['purl'] url = data['purl']
if (not url): if (not url):