修复音乐下载失败的问题
This commit is contained in:
@ -145,9 +145,9 @@ def download_music(song_name, choose):
|
||||
resp = requests.get(f"{url}/?msg={song_name}&n={choose}&br={br}&limit=60")
|
||||
resp.close()
|
||||
id = resp.json()["data"]["rid"].replace("MUSIC_", "")
|
||||
resp_lrc = requests.get(f"https://api.jkyai.top/API/yyjhss.php?id={id}&type=kw")
|
||||
resp_lrc.close()
|
||||
try:
|
||||
resp_lrc = requests.get(f"https://api.jkyai.top/API/yyjhss.php?id={id}&type=kw")
|
||||
resp_lrc.close()
|
||||
lrc = resp_lrc.json()["data"]["lrc"]
|
||||
except Exception as e:
|
||||
print(f"download_kw_lrc: {e}")
|
||||
@ -159,9 +159,9 @@ def download_music(song_name, choose):
|
||||
resp = requests.get(f"{url}/?name={song_name}&n={choose}&br={br}&limit=60")
|
||||
resp.close()
|
||||
id = resp.json()["data"]["id"]
|
||||
resp_lrc = requests.get(f"https://api.jkyai.top/API/yyjhss.php?id={id}&type=wy")
|
||||
resp_lrc.close()
|
||||
try:
|
||||
resp_lrc = requests.get(f"https://api.jkyai.top/API/yyjhss.php?id={id}&type=wy")
|
||||
resp_lrc.close()
|
||||
lrc = resp_lrc.json()["data"]["lrc"]
|
||||
except Exception as e:
|
||||
print(f"download_wyy_lrc: {e}")
|
||||
|
Reference in New Issue
Block a user