feat: 自动学习按视频完成和五分钟刷新学时,代理仅 HTTP/SOCKS

This commit is contained in:
2026-11-15 01:10:39 +08:00
parent 9e85a4184c
commit 1141df17f7
6 changed files with 349 additions and 82 deletions
+10 -2
View File
@@ -389,10 +389,18 @@ class ManualJigsaw(Exception):
class EunivClient:
def __init__(self, login_name: str, password: str) -> None:
def __init__(self, login_name: str, password: str, proxy: str | None = None) -> None:
from euniv.proxy import parse_proxy
self.login_name = login_name.strip()
self.password = password
self.client = httpx.Client(timeout=30, follow_redirects=True, headers={"User-Agent": USER_AGENT})
self.proxy = parse_proxy(proxy)
self.client = httpx.Client(
timeout=30,
follow_redirects=True,
proxy=self.proxy,
headers={"User-Agent": USER_AGENT},
)
self._profile: dict = {}
self._yxt_token = ""
self._cipher = ""