From fcae9bb0cea0da9b59b0338f332c0adc83103ac1 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 4 Jun 2021 11:46:18 +0200 Subject: [PATCH] remove aiohttp session --- backend/stream.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/backend/stream.py b/backend/stream.py index a3ed8ca..81ba639 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import json import sys -import urllib.parse import os import base64 import logging @@ -10,7 +9,6 @@ import tornado.web import tornado.routing import stream_providers import aiohttp -import aiohttp_socks logging.basicConfig(format='[%(filename)s:%(lineno)d] %(message)s', stream=sys.stdout, level=logging.INFO) logger = logging.getLogger(__name__) @@ -36,12 +34,6 @@ class ProxyElem(): def local(self): timeout = aiohttp.ClientTimeout(total=5) return aiohttp.ClientSession(timeout=timeout) - def session(self): - connector = None - if self.proxy is not None: - connector = aiohttp_socks.ProxyConnector.from_url("socks5://" + self.proxy) - timeout = aiohttp.ClientTimeout(total=2) - return aiohttp.ClientSession(connector=connector, timeout=timeout) def __repr__(self): return str(self.proxy) async def proxy_url(self, urls):