fixed socks proxy usage

This commit is contained in:
Ali Tlisov 2019-12-29 18:49:46 +03:00
parent e2f428ea46
commit c0353b802d

View file

@ -74,9 +74,9 @@ class BaseBot:
if isinstance(proxy, str) and (proxy.startswith('socks5://') or proxy.startswith('socks4://')):
from aiohttp_socks import SocksConnector
from aiohttp_socks.helpers import parse_socks_url
from aiohttp_socks.utils import parse_proxy_url
socks_ver, host, port, username, password = parse_socks_url(proxy)
socks_ver, host, port, username, password = parse_proxy_url(proxy)
if proxy_auth:
if not username:
username = proxy_auth.login