fix proxy url again
This commit is contained in:
parent
6463dd8cda
commit
f83c311246
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user