diff --git a/main.py b/main.py index 4a58170..4432424 100644 --- a/main.py +++ b/main.py @@ -52,6 +52,7 @@ os.environ['save_path'] = save_path = config.get('save_path') proxy = config.get('proxy') if proxy is not None: + import python_socks username = None password = None if '@' in proxy: @@ -63,7 +64,7 @@ addr = proxy.split(':')[0] port = proxy.split(':')[1] proxy = { - 'proxy_type': 'socks5', # (mandatory) protocol to use (see above) + 'proxy_type': python_socks.ProxyType.SOCKS5, # (mandatory) protocol to use (see above) 'addr': addr, # (mandatory) proxy IP address 'port': int(port), # (mandatory) proxy port number 'username': username, # (optional) username if the proxy requires auth @@ -78,10 +79,6 @@ # 配置处理结束 -async def upDate_dialogs(): - await client.get_dialogs() - - # 展示登陆的信息 def show_my_inf(me): print("-----****************-----")