2023-03-15 09:31:36 +00:00
|
|
|
from httpx import URL
|
|
|
|
|
|
|
|
from .get_calendar import GetCalendar
|
|
|
|
from .get_calendar_change import GetCalendarChange
|
2023-06-01 09:03:36 +00:00
|
|
|
from .get_exam_calendar import GetExamCalendar
|
2023-12-29 10:04:00 +00:00
|
|
|
from .get_exam_calendar_action import GetExamCalendarAction
|
2023-10-17 13:54:16 +00:00
|
|
|
from .get_score_detail import GetScoreDetail
|
2023-09-05 11:49:49 +00:00
|
|
|
from .get_selected_courses import GetSelectedCourses
|
2023-06-01 09:03:36 +00:00
|
|
|
from .login_jwmis import LoginJwmis
|
2023-03-15 09:31:36 +00:00
|
|
|
from .login_webvpn import LoginWebVPN
|
|
|
|
|
|
|
|
|
|
|
|
class WebVPN(
|
|
|
|
GetCalendar,
|
|
|
|
GetCalendarChange,
|
2023-06-01 09:03:36 +00:00
|
|
|
GetExamCalendar,
|
2023-12-29 10:04:00 +00:00
|
|
|
GetExamCalendarAction,
|
2023-10-17 13:54:16 +00:00
|
|
|
GetScoreDetail,
|
2023-09-05 11:49:49 +00:00
|
|
|
GetSelectedCourses,
|
2023-06-01 09:03:36 +00:00
|
|
|
LoginJwmis,
|
2023-03-15 09:31:36 +00:00
|
|
|
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,
|
|
|
|
)
|