Bladeren bron

存储 account 、token 与 proxy_ip 对应关系

xubo 1 jaar geleden
bovenliggende
commit
0e96dd783a
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      app.py

+ 2 - 1
app.py

@@ -102,6 +102,8 @@ def save_account_info(account, passwd, target_url, single_proxy):
                 redis_client.set(f'token_{account}', token)
                 redis_client.set(f'php_session_{account}', php_session)
                 redis_client.set(f'ci_session_{account}', login_session)
+                # 存储 account 、token 与 proxy_ip 对应关系
+                redis_client.set(f'proxy_ip_{account}', single_proxy)
 
                 file_writer.write_to_file(f'login account:{account}, 代理IP:{single_proxy}, token: {token} 登录成功!!!')
                 print(f"login account:{account}, 代理IP:{single_proxy}, token: {token} 登录成功!!!")
@@ -112,7 +114,6 @@ def save_account_info(account, passwd, target_url, single_proxy):
                 print(f"login account:{account}, login_session:{login_session}, token: {token} 已经登录!!!")
 
 
-
 def get_ticket(account, passwd, target_url, single_proxy):
     if single_proxy is not None:
         # 开始业务逻辑