zhongxinghong / PKUAutoElective

北大选课网补退选阶段自动选课小工具
MIT License
668 stars 231 forks source link

Missing fix from #66 #69

Closed guyutongxue closed 3 years ago

guyutongxue commented 3 years ago

66 修正了 API,但有一处代码忘记调整,现于此修复

zsaskk commented 2 years ago

2022.9.4,出现了选课过程中无法识别验证码的问题,请问作者有什么办法吗www

[INFO] loop, 20:37:05, Course(魅力化学, 1, 化学与分子工程学院, 200 / 199) is AVAILABLE now ! [INFO] loop, 20:37:05, Try to elect Course(魅力化学, 1, 化学与分子工程学院, 200 / 199) [INFO] loop, 20:37:05, Fetch a captcha [ERROR] loop.error, 20:37:05, JPEG Traceback (most recent call last): File "D:\desk\PKUAutoElective-master\autoelective\loop.py", line 510, in run_elective_loop captcha = recognizer.recognize(r.content) File "D:\desk\PKUAutoElective-master\autoelective\captcha\recognizer.py", line 62, in recognize im_segs = split_captcha(im_data) File "D:\desk\PKUAutoElective-master\autoelective\captcha\processor.py", line 88, in split_captcha assert im.format == "GIF", im.format AssertionError: JPEG [INFO] loop, 20:37:05, [INFO] loop, 20:37:05, ======== END Loop 1348 ======== [INFO] loop, 20:37:05, Main loop sleep 6.81642152346483 s [INFO] loop, 20:37:05, Exception in thread Elective: Traceback (most recent call last): File "D:\python\lib\threading.py", line 973, in _bootstrap_inner self.run() File "D:\python\lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "D:\desk\PKUAutoElective-master\autoelective\loop.py", line 709, in run_elective_loop raise e File "D:\desk\PKUAutoElective-master\autoelective\loop.py", line 510, in run_elective_loop captcha = recognizer.recognize(r.content) File "D:\desk\PKUAutoElective-master\autoelective\captcha\recognizer.py", line 62, in recognize im_segs = split_captcha(im_data) File "D:\desk\PKUAutoElective-master\autoelective\captcha\processor.py", line 88, in split_captcha assert im.format == "GIF", im.format AssertionError: JPEG

zhongxinghong commented 2 years ago

验证码换了,看一下以前的issue