增加了代理

This commit is contained in:
yml2213
2026-06-21 22:30:30 +08:00
parent 1ce867f3a8
commit 828f9889ed
10 changed files with 317 additions and 49 deletions
+6
View File
@@ -21,6 +21,7 @@ class Account:
class ProxyConfig:
"""代理配置"""
enabled: bool = False
api_url: str = ""
http: str = ""
https: str = ""
@@ -59,10 +60,15 @@ class Config:
proxy = self._config.get('proxy', {})
return ProxyConfig(
enabled=proxy.get('enabled', False),
api_url=proxy.get('api_url', ''),
http=proxy.get('http', ''),
https=proxy.get('https', ''),
)
def get_geetest_config(self) -> dict:
"""获取极验配置"""
return self._config.get('geetest', {'max_retries': 5})
def get_cookie_dir(self) -> str:
"""获取Cookie存储目录"""
return self._config.get('cookie_dir', 'data/cookies')