log proxy
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Roy Olav Purser 2022-04-03 13:51:24 +02:00
parent 230f542b54
commit 4d9cca40e7
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -1,16 +1,13 @@
import youtube_dl
import streamlink
import requests
import asyncio
import html.parser import html.parser
import urllib.parse import urllib.parse
import expiringdict
import subprocess import subprocess
import json import json
import re import asyncio
import config
import expiringdict
import requests
import youtube_dl
import config
class DummyLogger: class DummyLogger:
def debug(self, msg): def debug(self, msg):
@ -165,6 +162,8 @@ class StreamProvider:
proxies = {} proxies = {}
proxies["http"] = "socks5://" + self.proxy.proxy proxies["http"] = "socks5://" + self.proxy.proxy
proxies["https"] = "socks5://" + self.proxy.proxy proxies["https"] = "socks5://" + self.proxy.proxy
self.logger.info("%s <%s>", proxies, self.upstream)
ctype = None ctype = None
upstream = data.upstream() upstream = data.upstream()
try: try:
@ -204,6 +203,7 @@ class StreamProvider:
class StreamlinkRunner(StreamProvider): class StreamlinkRunner(StreamProvider):
def stream(self): def stream(self):
try: try:
self.logger.info("%s <%s>", self.proxy, self.upstream)
session = None session = None
if self.proxy is None or self.proxy.proxy is None: if self.proxy is None or self.proxy.proxy is None:
session = config.streamlink_default_session session = config.streamlink_default_session