更新音频链接HTTPS以及歌词翻译返回报错问题

This commit is contained in:
苏晓晴 2024-12-11 01:47:38 +08:00 committed by GitHub
parent 40710e9e40
commit 268a615049
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -190,8 +190,8 @@ def Song_v1():
"level":music_level1(urlv1['data'][0]['level']),
"size": size(urlv1['data'][0]['size']),
"url": song_url.replace("http://", "https://", 1),
"lyric": lyricv1['lrc']['lyric'],
"tlyric": lyricv1.get('tlyric', {}).get('lyric', None)
"lyric": lyricv1.get('lrc', {}).get('lyric', '无歌词'),
"tlyric": lyricv1.get('tlyric', {}).get('lyric', '无翻译歌词')
}
data = Response(json.dumps(data), content_type='application/json')
else: