Update app.py
Browse files
app.py
CHANGED
@@ -65,8 +65,7 @@ def prepare_media(source_path_or_url: os.PathLike,
|
|
65 |
if source_type == 'audio_filepath':
|
66 |
audio_file = source_path_or_url
|
67 |
elif source_type == 'youtube_url':
|
68 |
-
|
69 |
-
yt = YouTube(source_path_or_url, use_oauth=True, proxies=proxy_handler, allow_oauth_cache=False)
|
70 |
audio_stream = min(yt.streams.filter(only_audio=True), key=lambda s: s.bitrate)
|
71 |
mp4_file = audio_stream.download(output_path='downloaded') # ./downloaded
|
72 |
audio_file = mp4_file[:-3] + 'mp3'
|
|
|
65 |
if source_type == 'audio_filepath':
|
66 |
audio_file = source_path_or_url
|
67 |
elif source_type == 'youtube_url':
|
68 |
+
yt = YouTube(source_path_or_url, use_oauth=True, allow_oauth_cache=False)
|
|
|
69 |
audio_stream = min(yt.streams.filter(only_audio=True), key=lambda s: s.bitrate)
|
70 |
mp4_file = audio_stream.download(output_path='downloaded') # ./downloaded
|
71 |
audio_file = mp4_file[:-3] + 'mp3'
|