An asynchronous automation tool for course registration, inquiry, and session management. This engine is designed to handle state-heavy legacy systems by simulating required navigation paths and maintaining persistent session states.
The system requires specific session activation sequences to prevent server-side errors. For a detailed technical analysis of the underlying access logic, refer to: about_access_permissions.md.
This project requires Python 3.10+ and uses uv for dependency management.
- Install the environment and dependencies:
uv syncConfiguration is managed via custom.py. Copy the template to begin:
cp custom.py.example custom.pyRequired for all operations.
- How to obtain: Open the course system in a browser, press
F12, and navigate to Application -> Storage -> Cookies. - Values: Copy the values for
JSESSIONIDandSERVERNAME. - Expiry: If the script returns
302redirects, your cookies have expired and must be updated incustom.py.
The profileId is a prerequisite for both inquiry and selection.
- How to obtain: Log in to the course system manually and enter the course selection module. Check the browser address bar for the URL; the
profileIdis the numeric value following theprofileId=parameter. - Usage: Enter this ID in
INQUIRY_USER_DATAto enable searching, and inUSER_CONFIGSfor registration.
With valid cookies and a profileId, use the inquiry tool to retrieve specific course details.
- Command:
uv run main.py --inquire - Function: This command retrieves course names, teacher information, current enrollment status, and the unique Course ID.
- Alternative: Course IDs can also be obtained by inspecting network traffic via browser developer tools (F12), though using the
--inquirefunction is recommended for efficiency. - Usage: Copy the Course ID from the inquiry results into the
course_idslist underUSER_CONFIGSfor the registration process.
Configuration of the USE_PROXY setting depends on your connection method:
- Official VPN (EasyConnect) or Campus Network: These environments usually provide a direct route to the server, requiring
USE_PROXYto be set toFalse. - Third-party VPNs (e.g., EasierConnect): These environments often require a SOCKS5 proxy to route traffic. Set
USE_PROXYtoTrueand specify the proxy server address and port within theproxiesdictionary incustom.py.
Configure ENROLLMENT_DATA_API_PARAMS with the correct projectId and semesterId.
- How to obtain: Open the browser developer tools (
F12), switch to the Network tab, and refresh the course system page. Search forprojectIdorsemesterIdwithin the captured requests to find the values for the current academic term.
Commands are executed via uv run main.py <command>.
--start: Executes the registration process for all users defined inUSER_CONFIGS.--endless: Optional flag to retry indefinitely until successful. Used for sniping courses as they become available.
--inquire: Interactive mode to search for courses and check enrollment status. Requires a validprofileId.--validate: Batch verification of cookie validity for all accounts.--check: Real-time verification of course capacity and current enrollment status for courses in your config.--help: Displays the command help menu.
- Asynchronous Concurrency: Built with
asyncioandaiohttpfor efficient multi-account management. - Session Activation: Automated pre-access routine to satisfy server-side state requirements.
- Rate Limit Protection: Implements sequential activation and task interleaving to avoid triggering IP or session-based frequency limits.
- Data Sanitization: Built-in recovery for non-standard JSON responses from legacy endpoints.
- SSL: Verification is disabled by default to accommodate internal network certificate issues.
- Termination: Use
Ctrl+Cto stop the process safely.