mirror of
https://github.com/holll/teledown.git
synced 2025-01-08 11:37:45 +08:00
commit
4744859f30
7
main.py
7
main.py
@ -52,6 +52,7 @@ initDb(md5Token)
|
|||||||
os.environ['save_path'] = save_path = config.get('save_path')
|
os.environ['save_path'] = save_path = config.get('save_path')
|
||||||
proxy = config.get('proxy')
|
proxy = config.get('proxy')
|
||||||
if proxy is not None:
|
if proxy is not None:
|
||||||
|
import python_socks
|
||||||
username = None
|
username = None
|
||||||
password = None
|
password = None
|
||||||
if '@' in proxy:
|
if '@' in proxy:
|
||||||
@ -63,7 +64,7 @@ if proxy is not None:
|
|||||||
addr = proxy.split(':')[0]
|
addr = proxy.split(':')[0]
|
||||||
port = proxy.split(':')[1]
|
port = proxy.split(':')[1]
|
||||||
proxy = {
|
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
|
'addr': addr, # (mandatory) proxy IP address
|
||||||
'port': int(port), # (mandatory) proxy port number
|
'port': int(port), # (mandatory) proxy port number
|
||||||
'username': username, # (optional) username if the proxy requires auth
|
'username': username, # (optional) username if the proxy requires auth
|
||||||
@ -78,10 +79,6 @@ else:
|
|||||||
# 配置处理结束
|
# 配置处理结束
|
||||||
|
|
||||||
|
|
||||||
async def upDate_dialogs():
|
|
||||||
await client.get_dialogs()
|
|
||||||
|
|
||||||
|
|
||||||
# 展示登陆的信息
|
# 展示登陆的信息
|
||||||
def show_my_inf(me):
|
def show_my_inf(me):
|
||||||
print("-----****************-----")
|
print("-----****************-----")
|
||||||
|
Loading…
Reference in New Issue
Block a user