|
31 | 31 | @Component("NormalCourseApi") |
32 | 32 | @Slf4j |
33 | 33 | public class NormalCourseApi implements CourseApi { |
34 | | - @Autowired |
35 | | - private HttpSession session; |
36 | 34 |
|
37 | 35 | @Override |
38 | 36 | public List<Lesson> getCourse(CookieStore cookieStore) { |
39 | | - String uid = session.getAttribute("no").toString(); |
40 | 37 | List<Lesson> lessons; |
41 | | - lessons = getCourseFromMatrix(uid, cookieStore); |
| 38 | + lessons = getCourseFromMatrix(cookieStore); |
42 | 39 | return lessons; |
43 | 40 | } |
44 | 41 |
|
45 | | - public List<Lesson> getCourseFromMatrix(String uid, CookieStore cookieStore) { |
| 42 | + public List<Lesson> getCourseFromMatrix(CookieStore cookieStore) { |
46 | 43 | String prefix = "https://epo.cug.edu.cn/"; |
47 | 44 | String preReq = Requests.getForString(prefix + "Gstudent/LeftMenu.aspx", "", cookieStore); |
48 | 45 | int from = preReq.indexOf("'学期课表信息查询',t:'',url:'") + 21; |
@@ -90,7 +87,7 @@ public List<Lesson> getCourseFromMatrix(String uid, CookieStore cookieStore) { |
90 | 87 | } |
91 | 88 | String classroom = parts[1].replace("地点:", "").replace("]}", ""); |
92 | 89 | lessons.add(new Lesson("-", teacher, classroom, week, "", courseName, |
93 | | - String.valueOf(sectionEnd), String.valueOf(weekday), String.valueOf(course), "", String.valueOf(course))); |
| 90 | + String.valueOf(sectionEnd), String.valueOf(weekday + 1), String.valueOf(course), "", String.valueOf(course))); |
94 | 91 | } |
95 | 92 | } |
96 | 93 | } |
|
0 commit comments