初版:教务抢课系统 jwxt(从线上实例导出)

This commit is contained in:
deploy
2026-10-29 12:54:56 +08:00
commit 4adf153426
106 changed files with 50288 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
统一配置中心 — 所有全局常量集中管理
"""
from pathlib import Path
# ── 项目路径 ──
BASE_DIR = Path(__file__).parent.parent
SESSION_DIR = BASE_DIR / "sessions"
ACCOUNTS_FILE = BASE_DIR / "accounts.json"
# 确保目录存在
SESSION_DIR.mkdir(exist_ok=True)
# ── 教务系统(多地址,自动按延迟切换)──
BASE_URLS = [
"https://jwxt.sdmu.edu.cn/jwglxt",
"http://10.224.2.186/jwglxt",
"http://10.224.2.164/jwglxt",
]
GNMKDM = "N253512"
# ── 抢课引擎 ──
# 抢课间隔(秒),随机范围 [min, max],模拟人为操作
# 分两个时段分别设置,按小时(24h制)切换
GRAB_INTERVAL_DAY_MIN = 1 # 时段A 最小间隔(秒)
GRAB_INTERVAL_DAY_MAX = 2 # 时段A 最大间隔(秒)
GRAB_INTERVAL_NIGHT_MIN = 2 # 时段B 最小间隔(秒)
GRAB_INTERVAL_NIGHT_MAX = 3 # 时段B 最大间隔(秒)
GRAB_TIME_A_START = 8 # 时段A 开始(小时)
GRAB_TIME_A_END = 23 # 时段A 结束(小时),其余时间为时段B
SESSION_RETRY_INTERVAL = 5 # Session刷新后重试间隔(秒)