Closed ghost closed 1 year ago
目前可以通过多次尝试通过,去教务系统查看发现最近教务系统的验证码位数由4位变为了4-5位并且更难识别了(字母粘在一起更加紧密) 而且偶见如下错误
msg: "[验证码识别出现问题了照片中未检测到文本]\nTraceback (most recent call last):\n File \"C:\Users\\ Admin\Desktop\Sign\programs\ruoli\login\Utils.py\", line 143, in getCodeFromImg\n\ \ resp = client.GeneralBasicOCR(req)\n File \"C:\Users\Admin\Desktop\Sign\\ programs\ruoli\tencentcloud\ocr\v20181119\ocr_client.py\", line 48, in GeneralBasicOCR\n\ \ raise TencentCloudSDKException(code, message, reqid)\ntencentcloud.common.exception.tencent_cloud_sdk_exception.TencentCloudSDKException:\ \ [TencentCloudSDKException] code:FailedOperation.ImageNoText message:照片中未检测到文本\ \ requestId:e22027cc-e3c5-4415-af93-36ad67b50317\n\nDuring handling of the above\ \ exception, another exception occurred:\n\nTraceback (most recent call last):\n\ \ File \"C:\Users\Admin\Desktop\Sign\programs\ruoli\handler.py\", line 69,\ \ in execute\n self._beforeExecute()\n File \"C:\Users\Admin\Desktop\Sign\\ programs\ruoli\handler.py\", line 130, in _beforeExecute\n self._login()\n\ \ File \"C:\Users\Admin\Desktop\Sign\programs\ruoli\handler.py\", line 102,\ \ in _login\n today.login()\n File \"C:\Users\Admin\Desktop\Sign\programs\\ ruoli\todayLoginService.py\", line 135, in login\n self.checkLogin()\n File\ \ \"C:\Users\Admin\Desktop\Sign\programs\ruoli\todayLoginService.py\", line\ \ 129, in checkLogin\n self.session.cookies = self.loginEntity.login()\n File\ \ \"C:\Users\Admin\Desktop\Sign\programs\ruoli\login\casLogin.py\", line\ \ 124, in login\n self.solve_captcha(params)\n File \"C:\Users\Admin\Desktop\\ Sign\programs\ruoli\login\casLogin.py\", line 62, in solve_captcha\n params[\"\ captchaResponse\"] = Utils.getCodeFromImg(self.session, imgUrl)\n File \"C:\Users\\ Admin\Desktop\Sign\programs\ruoli\login\Utils.py\", line 151, in getCodeFromImg\n\ \ return Utils.getCodeFromImg(res, imgUrl)\n File \"C:\Users\Admin\Desktop\\ Sign\programs\ruoli\login\Utils.py\", line 151, in getCodeFromImg\n return\ \ Utils.getCodeFromImg(res, imgUrl)\n File \"C:\Users\Admin\Desktop\Sign\\ programs\ruoli\login\Utils.py\", line 151, in getCodeFromImg\n return Utils.getCodeFromImg(res,\ \ imgUrl)\n [Previous line repeated 69 more times]\n File \"C:\Users\Admin\\ Desktop\Sign\programs\ruoli\login\Utils.py\", line 153, in getCodeFromImg\n\ \ raise Exception(\"验证码识别出现问题了\" + str(err.message))\nException: 验证码识别出现问题了照片中未检测到文本\n"
希望能够在captchaLen字段匹配一个数组而不是一个数字,不然通过率会比较低
日志: LOG#t=2023-03-21--08-50-47##.txt