增加了代理
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user