fix: kuwo源配置kuwodes时报错 #37

This commit is contained in:
lerdb 2024-01-31 22:27:47 +08:00
parent eca696c79b
commit 73d95b6032
No known key found for this signature in database
GPG Key ID: FBBF3738C577282C

View File

@ -80,13 +80,14 @@ async def url(songId, quality):
url = ''
bitrate = 1
if (des_info["response_type"] == 'json'):
body = req.json()
url = req.json()
for p in des_info['url_json_path'].split('.'):
url = body.get(p)
url = url.get(p)
if (url == None):
raise FailedException('failed')
bitrate = req.json()
for p in des_info['bitrate_json_path'].split('.'):
bitrate = body.get(p)
bitrate = bitrate.get(p)
if (bitrate == None):
raise FailedException('failed')
elif (des_info['response_type'] == 'text'):