-
Couldn't load subscription status.
- Fork 2
支持根據系所、年級,查找體育課程真實的「選上機率」「選課比例」 #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
很感謝你的PR 由於我是重度vibe coder |
|
了解,正在著手修改,稍等不久後會推上新的 🐳 |
|
我這裡測試可以,再麻煩你了 ouob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看起來應該就剩這些改一下就差不多了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM


This pull request introduces enhanced logic for handling physical education (PE) course probability calculations by incorporating student identity information. It also refactors and improves data structures, fixes a typo, and adds new utility functions for extracting student identity from HTML. The changes allow for more accurate calculation of course selection probabilities, especially for PE courses, by matching enrollment limits based on the student's department and grade.
Enhanced PE Course Probability Calculation:
get_pe_course_info_with_identitythat uses student identity to fetch and calculate PE course probabilities more accurately by matching department-specific enrollment limits. This logic is integrated into the course fetching process when student identity is available. [1] [2]fetch_all_courses_with_identityto support course fetching with optional student identity, and updated the main entry point to use this enhanced logic if identity extraction succeeds. [1] [2]Student Identity Extraction:
StudentIdentitystruct and theextract_student_identityfunction, which parses HTML content to extract program type, department, and grade information for the current student. [1] [2] [3]API Response Handling:
CourseDetailResponse,CourseDetail) and theget_course_limit_detailfunction to fetch and parse department-specific enrollment limit data from the API, supporting the new PE course logic. [1] [2]Bug Fix:
Coursestruct and related logic, renamingsucess_ratetosuccess_ratethroughout the codebase for consistency and correctness. [1] [2] [3]Code Integration:
src/main.rsto use the new functions and handle fallback when student identity cannot be extracted, ensuring backward compatibility. [1] [2]