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")