Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +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 |
-
proxy_handler = {"http": "http://
|
69 |
yt = YouTube(source_path_or_url, proxies=proxy_handler) #use_oauth=True, 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
|
|
|
65 |
if source_type == 'audio_filepath':
|
66 |
audio_file = source_path_or_url
|
67 |
elif source_type == 'youtube_url':
|
68 |
+
proxy_handler = {"http": "http://108.61.175.7:31802", "https":"http://190.187.201.26:8080", "https":"http://38.54.71.67:80"}
|
69 |
yt = YouTube(source_path_or_url, proxies=proxy_handler) #use_oauth=True, 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
|