mirror of
https://github.com/cqwu-ehall/cqwu-ehall.git
synced 2024-12-02 05:43:41 +00:00
ca794ea619
Co-authored-by: brian <brian@xtaolabs.com>
23 lines
557 B
Python
23 lines
557 B
Python
from httpx import URL
|
|
|
|
from .get_calendar import GetCalendar
|
|
from .get_calendar_change import GetCalendarChange
|
|
from .login_webvpn import LoginWebVPN
|
|
|
|
|
|
class WebVPN(
|
|
GetCalendar,
|
|
GetCalendarChange,
|
|
LoginWebVPN,
|
|
):
|
|
@staticmethod
|
|
def get_web_vpn_host(url: URL, https: bool = False) -> str:
|
|
return next(
|
|
(
|
|
f"https://clientvpn.cqwu.edu.cn/{'https' if https else 'http'}/{i}"
|
|
for i in str(url).split("/")
|
|
if i.startswith("webvpn")
|
|
),
|
|
None,
|
|
)
|