mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
fix(music_download): 增强下载日志,添加歌曲ID和URL信息
This commit is contained in:
parent
78237a30a6
commit
a9e873d15a
1 changed files with 1 additions and 1 deletions
|
|
@ -281,7 +281,7 @@ async def music_download(song_id):
|
||||||
async with async_client.stream("GET",song_url.text,headers=headers,follow_redirects=True) as response:
|
async with async_client.stream("GET",song_url.text,headers=headers,follow_redirects=True) as response:
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
logger.debug(f"下载歌曲中...")
|
logger.debug(f"下载歌曲ID:{song_id}\nURL:{song_url.text}\n开始下载中...")
|
||||||
file_path = os.path.join(save_path, f"{datetime.now().date()}-{uuid.uuid4().hex}-{song_id}.wav")
|
file_path = os.path.join(save_path, f"{datetime.now().date()}-{uuid.uuid4().hex}-{song_id}.wav")
|
||||||
file_name = os.path.basename(f"{datetime.now().date()}-{uuid.uuid4().hex}-{song_id}.wav")
|
file_name = os.path.basename(f"{datetime.now().date()}-{uuid.uuid4().hex}-{song_id}.wav")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue