Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,7 @@ def prepare_media(source_path_or_url: os.PathLike,
|
|
67 |
# Download from youtube
|
68 |
try:
|
69 |
# Try PyTube first
|
70 |
-
proxy_handler = {
|
71 |
yt = YouTube(source_path_or_url, proxies=proxy_handler)
|
72 |
audio_stream = min(yt.streams.filter(only_audio=True), key=lambda s: s.bitrate)
|
73 |
mp4_file = audio_stream.download(output_path='downloaded') # ./downloaded
|
|
|
67 |
# Download from youtube
|
68 |
try:
|
69 |
# Try PyTube first
|
70 |
+
proxy_handler = {"http": "http://127.0.0.1:1087", "https":'http://127.0.0.1:1087'}
|
71 |
yt = YouTube(source_path_or_url, proxies=proxy_handler)
|
72 |
audio_stream = min(yt.streams.filter(only_audio=True), key=lambda s: s.bitrate)
|
73 |
mp4_file = audio_stream.download(output_path='downloaded') # ./downloaded
|