This commit is contained in:
Daniil Barodkin
2026-07-11 20:20:49 +03:00
parent 1ed79ce261
commit 4f6dda7192
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -22,7 +22,11 @@ def download_youtube(url: str):
}],
'outtmpl': f'{MUSIC_DIR}/Youtube/%(uploader)s/%(title)s.%(ext)s',
'noplaylist': False,
'quiet': False
'quiet': False,
# --- НОВЫЕ НАСТРОЙКИ ---
'proxy': 'socks5://host.docker.internal:1080', # Идем через Германию
'socket_timeout': 30, # Даем больше времени на ответ
'source_address': '0.0.0.0', # Отключаем IPv6
}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])