Merge pull request #248 from a6a3uh/fix_socks_login

Latest version of aiohttp_socks changed interface
This commit is contained in:
Alex Root Junior 2020-01-01 16:41:25 +02:00 committed by GitHub
commit c19e2a0d42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,9 +75,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