try except import

This commit is contained in:
Roy Olav Purser 2021-11-18 23:02:14 +01:00
parent 4bd5ed6ccc
commit c959eb07b6
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -1,5 +1,10 @@
import youtube_dl
try:
import streamlink
except Exception as e:
print(e)
import requests
import asyncio
import html.parser
@ -9,13 +14,17 @@ import subprocess
import json
import re
try:
streamlink_sessions = {}
streamlink_default_session = streamlink.Streamlink()
def setup(proxies):
try:
for proxy in proxies:
streamlink_sessions[proxy] = streamlink.Streamlink()
streamlink_sessions[proxy].set_option("http-proxy", "socks5://" + proxy)
streamlink_sessions[proxy].set_option("https-proxy", "socks5://" + proxy)
except Exception as e:
print(e)
class DummyLogger():
def debug(self, msg):