Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,6 +51,8 @@ def download_audio(url):
|
|
51 |
yt = YouTube(url)
|
52 |
audio_stream = yt.streams.filter(only_audio=True).first()
|
53 |
with NamedTemporaryFile(delete=False) as tempfile:
|
|
|
|
|
54 |
audio_stream.download(filename=tempfile.name)
|
55 |
return tempfile.name
|
56 |
except pytube_exceptions.PytubeError as e:
|
|
|
51 |
yt = YouTube(url)
|
52 |
audio_stream = yt.streams.filter(only_audio=True).first()
|
53 |
with NamedTemporaryFile(delete=False) as tempfile:
|
54 |
+
# Your code to use the tempfile
|
55 |
+
|
56 |
audio_stream.download(filename=tempfile.name)
|
57 |
return tempfile.name
|
58 |
except pytube_exceptions.PytubeError as e:
|