Skip to content

Commit

Permalink
ver 2.1 修复选课人数超过课容量时产生的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
starwingChen committed Mar 1, 2020
1 parent 0204ea7 commit 688bee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xk_spider/GetCourse.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def judge(self, course_name, teacher, key='', kind='素选'):

for course in datalist:
remain = int(course['classCapacity']) - int(course['numberOfFirstVolunteer'])
if remain and course['teacherName'] == teacher:
if remain > 0 and course['teacherName'] == teacher:
string = f'{course_name} {teacher}{remain}人空缺'
print(string)
to_wechat(key, f'{course_name} 余课提醒', string)
Expand Down

0 comments on commit 688bee3

Please sign in to comment.