CarltonHere / auto-cpdaily

今日校园自动化是一个基于Python的爬虫项目,主要实现今日校园签到、信息收集、查寝等循环表单的自动化任务
https://carltonhere.github.io/auto-cpdaily/
Other
311 stars 69 forks source link

验证码识别出现问题 #44

Closed Somepl closed 2 years ago

Somepl commented 2 years ago

START RequestId: da8aa7a3-2a66-4886-834c-f5883e1d404e

2022-04-12 15:57:26 V1.8.6 自动化任务开始执行

2022-04-12 15:57:26 V1.8.6 10s后开始执行用户19111301291的任务

2022-04-12 15:57:36 V1.8.6 正在获取登录地址

2022-04-12 15:57:36 V1.8.6 开始尝试登录账号

Starting new HTTPS connection (1): mobile.campushoy.com:443

https://mobile.campushoy.com:443 "GET /v6/config/guest/tenant/list HTTP/1.1" 200 None

https://mobile.campushoy.com:443 "GET /v6/config/guest/tenant/info?ids=ahnu HTTP/1.1" 200 None

Starting new HTTPS connection (1): ahnu.campusphere.net:443

https://ahnu.campusphere.net:443 "GET /wec-portal-mobile/client HTTP/1.1" 301 178

https://ahnu.campusphere.net:443 "GET /wec-portal-mobile/client/ HTTP/1.1" 302 154

https://ahnu.campusphere.net:443 "GET /iap/login?service=https%3A%2F%2Fahnu.campusphere.net%2Fwec-portal-mobile%2Fclient%2F HTTP/1.1" 302 0

Starting new HTTPS connection (1): ids.ahnu.edu.cn:443

https://ids.ahnu.edu.cn:443 "GET /authserver/login?service=https%3A%2F%2Fahnu.campusphere.net%2Fiap%2FloginSuccess%3FsessionToken%3D8c613dc91647476992900f5ebf9f246a HTTP/1.1" 200 6217

https://ids.ahnu.edu.cn:443 "GET /authserver/login?service=https%3A%2F%2Fahnu.campusphere.net%2Fiap%2FloginSuccess%3FsessionToken%3D8c613dc91647476992900f5ebf9f246a HTTP/1.1" 200 5685

https://ids.ahnu.edu.cn:443 "GET /authserver/needCaptcha.html?username=19111301291 HTTP/1.1" 200 4

2022-04-12 15:57:46 V1.8.6 开始识别验证码

https://ids.ahnu.edu.cn:443 "GET /authserver/captcha.html HTTP/1.1" 200 2221

2022-04-12 15:57:46 V1.8.6 Error:[验证码识别出现问题了The SecretId is not found, please ensure that your SecretId is correct.]

Traceback (most recent call last):

File "/var/user/actions/utils.py", line 87, in getCodeFromImg

resp = client.GeneralBasicOCR(req)

File "/var/user/tencentcloud/ocr/v20181119/ocr_client.py", line 48, in GeneralBasicOCR

raise TencentCloudSDKException(code, message, reqid)

tencentcloud.common.exception.tencent_cloud_sdk_exception.TencentCloudSDKException: [TencentCloudSDKException] code:AuthFailure.SecretIdNotFound message:The SecretId is not found, please ensure that your SecretId is correct. requestId:6b61a30a-6c9a-4234-86be-c5ab4c927513

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/var/user/index.py", line 23, in main

msg = working(user, httpProxy)

File "/var/user/index.py", line 56, in working

wise.login()

File "/var/user/actions/wiseLoginService.py", line 93, in login

self.checkLogin()

File "/var/user/actions/wiseLoginService.py", line 87, in checkLogin

self.session.cookies = self.loginEntity.login()

File "/var/user/actions/casLogin.py", line 95, in login

self.session, imgUrl)

File "/var/user/actions/utils.py", line 99, in getCodeFromImg

raise Exception('验证码识别出现问题了' + str(err.message))

Exception: 验证码识别出现问题了The SecretId is not found, please ensure that your SecretId is correct.

2022-04-12 15:57:46 V1.8.6 消息推送服务未启用

2022-04-12 15:57:46 V1.8.6 10s后开始执行用户19111301291的任务

2022-04-12 15:57:56 V1.8.6 正在获取登录地址

2022-04-12 15:57:56 V1.8.6 开始尝试登录账号

Starting new HTTPS connection (1): mobile.campushoy.com:443

https://mobile.campushoy.com:443 "GET /v6/config/guest/tenant/list HTTP/1.1" 200 None

https://mobile.campushoy.com:443 "GET /v6/config/guest/tenant/info?ids=ahnu HTTP/1.1" 200 None

Starting new HTTPS connection (1): ahnu.campusphere.net:443

https://ahnu.campusphere.net:443 "GET /wec-portal-mobile/client HTTP/1.1" 301 178

https://ahnu.campusphere.net:443 "GET /wec-portal-mobile/client/ HTTP/1.1" 302 154

https://ahnu.campusphere.net:443 "GET /iap/login?service=https%3A%2F%2Fahnu.campusphere.net%2Fwec-portal-mobile%2Fclient%2F HTTP/1.1" 302 0

Starting new HTTPS connection (1): ids.ahnu.edu.cn:443

https://ids.ahnu.edu.cn:443 "GET /authserver/login?service=https%3A%2F%2Fahnu.campusphere.net%2Fiap%2FloginSuccess%3FsessionToken%3Dcf20bb6fc00c41c2a47458bec4666ef2 HTTP/1.1" 200 6217

https://ids.ahnu.edu.cn:443 "GET /authserver/login?service=https%3A%2F%2Fahnu.campusphere.net%2Fiap%2FloginSuccess%3FsessionToken%3Dcf20bb6fc00c41c2a47458bec4666ef2 HTTP/1.1" 200 5685

https://ids.ahnu.edu.cn:443 "GET /authserver/needCaptcha.html?username=19111301291 HTTP/1.1" 200 4

2022-04-12 15:57:58 V1.8.6 开始识别验证码

https://ids.ahnu.edu.cn:443 "GET /authserver/captcha.html HTTP/1.1" 200 2224

2022-04-12 15:57:58 V1.8.6 Error:[验证码识别出现问题了The SecretId is not found, please ensure that your SecretId is correct.]

Traceback (most recent call last):

File "/var/user/actions/utils.py", line 87, in getCodeFromImg

resp = client.GeneralBasicOCR(req)

File "/var/user/tencentcloud/ocr/v20181119/ocr_client.py", line 48, in GeneralBasicOCR

raise TencentCloudSDKException(code, message, reqid)

tencentcloud.common.exception.tencent_cloud_sdk_exception.TencentCloudSDKException: [TencentCloudSDKException] code:AuthFailure.SecretIdNotFound message:The SecretId is not found, please ensure that your SecretId is correct. requestId:33c5a192-6451-46fe-a651-a133ab3ad6a8

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/var/user/index.py", line 23, in main

msg = working(user, httpProxy)

File "/var/user/index.py", line 56, in working

wise.login()

File "/var/user/actions/wiseLoginService.py", line 93, in login

self.checkLogin()

File "/var/user/actions/wiseLoginService.py", line 87, in checkLogin

self.session.cookies = self.loginEntity.login()

File "/var/user/actions/casLogin.py", line 95, in login

self.session, imgUrl)

File "/var/user/actions/utils.py", line 99, in getCodeFromImg

raise Exception('验证码识别出现问题了' + str(err.message))

Exception: 验证码识别出现问题了The SecretId is not found, please ensure that your SecretId is correct.

2022-04-12 15:57:58 V1.8.6 消息推送服务未启用

2022-04-12 15:57:58 V1.8.6 自动化任务执行完毕

Response RequestId: da8aa7a3-2a66-4886-834c-f5883e1d404e RetMsg: "Finished"

END RequestId: da8aa7a3-2a66-4886-834c-f5883e1d404e

Report RequestId: da8aa7a3-2a66-4886-834c-f5883e1d404e Duration: 31903ms Memory: 128MB MemUsage: 35.75MB

CarltonHere commented 2 years ago

请遵循文档中的指引开通OCR服务并申请密钥,请务必把密钥填入config.yml的对应位置