Spaces:
Runtime error
Runtime error
Update run.py
Browse files
run.py
CHANGED
@@ -20,9 +20,10 @@ def downloader(video_url, audio_format):
|
|
20 |
}
|
21 |
|
22 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
23 |
-
ydl.download([video_url])
|
24 |
|
25 |
-
|
|
|
26 |
|
27 |
return final_output_path
|
28 |
|
|
|
20 |
}
|
21 |
|
22 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
23 |
+
result = ydl.download([video_url])
|
24 |
|
25 |
+
# Replace %(ext)s with the actual format
|
26 |
+
final_output_path = final_output_path.replace('%(ext)s', audio_format)
|
27 |
|
28 |
return final_output_path
|
29 |
|