노래 다운로드 완성

insta
bluebamus 2025-12-22 19:03:42 +09:00
parent c65a1dac74
commit b59139dfaf
1 changed files with 2 additions and 1 deletions

View File

@ -321,7 +321,8 @@ async def download_song(
response = await client.get(stream_audio_url, timeout=60.0) response = await client.get(stream_audio_url, timeout=60.0)
response.raise_for_status() response.raise_for_status()
async with aiofiles.open(file_path, "wb") as f: # aiofiles는 Path 객체를 문자열로 변환하여 사용
async with aiofiles.open(str(file_path), "wb") as f:
await f.write(response.content) await f.write(response.content)
# 프론트엔드에서 접근 가능한 URL 생성 # 프론트엔드에서 접근 가능한 URL 생성