From f83c31124622fafd18197fcdec0f81c2510fa2fe Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Sat, 29 May 2021 11:08:17 +0200 Subject: [PATCH] fix proxy url again --- backend/stream_providers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/stream_providers.py b/backend/stream_providers.py index a4be185..a8c499e 100755 --- a/backend/stream_providers.py +++ b/backend/stream_providers.py @@ -10,8 +10,8 @@ streamlink_default_session = streamlink.Streamlink() def setup(proxies): for proxy in proxies: streamlink_sessions[proxy] = streamlink.Streamlink() - streamlink_sessions[proxy].set_option("http-proxy", proxy) - streamlink_sessions[proxy].set_option("https-proxy", proxy) + streamlink_sessions[proxy].set_option("http-proxy", "socks5://" + proxy) + streamlink_sessions[proxy].set_option("https-proxy", "socks5://" + proxy) class DummyLogger(): def debug(self, msg): @@ -120,7 +120,7 @@ class YoutubeRunner(StreamProvider): opts = {} opts["logger"] = DummyLogger() if isinstance(self.proxy, str): - opts["proxy"] = f'socks5://{self.proxy}' + opts["proxy"] = "socks5://" + self.proxy with youtube_dl.YoutubeDL(opts) as ydl: info = ydl.extract_info(self.upstream, download=False) vformats = info.get("formats")