From 84ece943ee8a4d8e5c209174f48065f9d0135a82 Mon Sep 17 00:00:00 2001 From: NFL_jiancx <1678594309@qq.com> Date: Sat, 6 Sep 2025 22:28:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(KUGOU):=20=E4=BF=AE=E5=A4=8D=E9=85=B7?= =?UTF-8?q?=E7=8B=97=E9=9F=B3=E4=B9=90=E6=90=9C=E7=B4=A2=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在发送请求前,移除歌曲名称中的空格 - 提高了酷狗音乐搜索的准确性 --- NFLmusic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NFLmusic.py b/NFLmusic.py index 7a8908e..a424f13 100644 --- a/NFLmusic.py +++ b/NFLmusic.py @@ -311,7 +311,7 @@ def get_data_without_blocking(song_name): elif choice == "QQ": url1 = f"{url}?msg={song_name}&num=60&type=json&key=Dragon5B887C2DC41AD03C93F06BAF4B7888C3" elif choice == "KUGOU": - url1 = f"{url}?msg={song_name}&num=60&type=json&key=Dragon5B887C2DC41AD03C93F06BAF4B7888C3" + url1 = f"{url}?msg={song_name.replace(' ', '')}&num=60&type=json&key=Dragon5B887C2DC41AD03C93F06BAF4B7888C3" resp = requests.get(url1) jsondata = resp.json()["data"] resp.close()