fix(proxy): 修正获取代理地址时的字典访问方式

- 将 account_list[account_name].address 修改为 account_list[account_name].get("address")
- 防止访问属性时出现异常,增强代码健壮性
- 优化代理地址获取逻辑,提高兼容性
This commit is contained in:
danial
2025-11-14 17:40:28 +08:00
parent abf9abc3c5
commit fcce6b6100

View File

@@ -39,7 +39,7 @@ class ProxyService:
def get_proxy(self, account_name: str):
self.set_expire_strategy()
if account_name in account_list:
return account_list[account_name].address
return account_list[account_name].get("address")
return self.set_proxy(account_name)
def set_proxy(self, account_name: str):