From 6463dd8cdab0b0b50ee23f961994b1b446c58a55 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Sat, 29 May 2021 11:03:46 +0200 Subject: [PATCH] fix proxy url --- backend/stream_providers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/stream_providers.py b/backend/stream_providers.py index d5ca056..a4be185 100755 --- a/backend/stream_providers.py +++ b/backend/stream_providers.py @@ -81,7 +81,7 @@ class StreamProvider(): self.logger = logger proxy = str(proxy) if len(proxy) > 5: - self.proxy = "socks5://" + proxy + self.proxy = proxy async def run(self): data = None try: @@ -120,7 +120,7 @@ class YoutubeRunner(StreamProvider): opts = {} opts["logger"] = DummyLogger() if isinstance(self.proxy, str): - opts["proxy"] = self.proxy + opts["proxy"] = f'socks5://{self.proxy}' with youtube_dl.YoutubeDL(opts) as ydl: info = ydl.extract_info(self.upstream, download=False) vformats = info.get("formats")