icepage / AutoUpdateJdCookie

自用青龙面板辅助工具,用于自动登录JD获取许可更新青龙面板
235 stars 106 forks source link

我第二个号,自动滑块跟失败都失败,也不会出短信验证码,是哪里没设置好? #34

Closed sd462355991 closed 1 month ago

sd462355991 commented 1 month ago

config.py配置

JD用户信息

user_datas = { "159隐私隐私隐私8": { "password": "隐私隐私隐私a", "pt_pin": "jd_4隐私隐私隐私06", "sms_func": "manual_input", "force_update": True }, "1814隐私隐私隐私71": { "password": "a98隐私隐私隐私91a", "pt_pin": "1814隐私隐私隐私1_p", "sms_func": "manual_input", "force_update": True }, "13500000001": { "password": "123456", "pt_pin": "123456", "sms_func": "webhook", "sms_webhook": "https://127.0.0.1:3000/getCode" }, "13500000002": { "password": "123456", "pt_pin": "123456", }, }

ql信息

qinglong_data = { "url": "http://192.168.111.137:25700/", "client_id": "g4V隐私隐私隐私bu3", "client_secret": "0gOwT隐私隐私隐私pluaAc", "username": "admin", "password": "123456",

可选参数,QL面板的sessionid,主要是避免抢占QL后台的登录。需要在浏览器上,F12上获取Authorization的请求头。如果为空或不设置则账号密码登录

"token": ""

}

滑块验证码的偏差, 如果一直滑过了, 或滑不到, 可以调节下

slide_difference = 10

是否自动识别移动滑块,有时不准,就关掉吧

auto_move = True

是否自动形状验证码识别,有时不准,就关掉吧

auto_shape_recognition = True

定时器

cron_expression = "35 5,7,9,11,13,15,17,19,21,23 *"

浏览器是否开启无头模式,即是否展示整个登录过程

headless = True

是否开启发消息

is_send_msg = True

更新成功后是否发消息的开关

is_send_success_msg = True

更新失败后是否发消息的开关

is_send_fail_msg = True

配置发送地址

send_info = { "send_wecom": [ "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ac3e隐私隐私隐私bef" ], "send_webhook": [ ], "send_dingtalk": [ ], "send_feishu": [ ] }

sms_func为填写验信验证码的模式,有3种可选,如下:

no 关闭短信验证码识别

manual_input 手动在终端输入验证码

webhook 调用api获取验证码,可实现全自动填写验证码

sms_func = "manual_input" sms_webhook = "https://127.0.0.1:3000/getCode"

终端显示

2024-10-19 08:20:44.447 | INFO | main:get_ql_api:439 - 开始获取QL登录态...... 2024-10-19 08:20:44.449 | INFO | main:get_ql_api:445 - 使用client_id和client_secret登录...... 2024-10-19 08:20:44.508 | INFO | main:get_ql_api:449 - client_id和client_secret正常可用...... 2024-10-19 08:20:44.531 | INFO | main:main:489 - 获取环境变量成功 2024-10-19 08:20:45.498 | INFO | main:main:514 - 开始更新159隐私隐私隐私68 2024-10-19 08:20:55.072 | INFO | main:auto_move_slide:73 - 第1次尝试自动移动滑块中... 2024-10-19 08:21:03.213 | INFO | main:auto_move_slide:73 - 第2次尝试自动移动滑块中... 2024-10-19 08:21:06.218 | INFO | main:auto_move_slide:79 - 未找到小图,退出移动滑块 2024-10-19 08:21:07.709 | INFO | main:auto_shape:134 - 第1次自动识别形状中... 2024-10-19 08:21:08.840 | INFO | main:auto_shape:203 - 开始文字识别,点击中...... 2024-10-19 08:21:25.049 | INFO | main:auto_shape:134 - 第2次自动识别形状中... 2024-10-19 08:21:28.056 | INFO | main:auto_shape:140 - 未找到形状图,退出识别状态 2024-10-19 08:21:29.082 | INFO | main:get_jd_pt_key:415 - 等待获取cookie... 2024-10-19 08:21:29.261 | INFO | main:main:523 - 更新内容为{'id': 6, 'value': 'pt_key=AAJnEvuDADAFUEO-4xjbZgHlRthxwNO2WF-cmAb隐私隐私隐私隐私隐私隐私1Q;pt_pin=jd_4a隐私隐私隐私6;', 'remarks': '大号', 'name': 'JD_COOKIE'} 2024-10-19 08:21:29.344 | INFO | main:main:527 - 159隐私隐私隐私8更新成功 2024-10-19 08:21:29.400 | INFO | main:main:536 - 159隐私隐私隐私8启用成功 2024-10-19 08:21:29.653 | INFO | utils.tools:send_msg:332 - 发送消息到 https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ac隐私隐私隐私隐私隐私隐私ef, 响应:{'errcode': 0, 'errmsg': 'ok'} 2024-10-19 08:21:29.654 | INFO | main:main:514 - 开始更新181隐私隐私隐私1 2024-10-19 08:21:39.463 | INFO | main:auto_move_slide:73 - 第1次尝试自动移动滑块中... 2024-10-19 08:21:46.788 | INFO | main:auto_move_slide:73 - 第2次尝试自动移动滑块中... 2024-10-19 08:21:49.794 | INFO | main:auto_move_slide:79 - 未找到小图,退出移动滑块 2024-10-19 08:21:51.238 | INFO | main:auto_shape:134 - 第1次自动识别形状中... 2024-10-19 08:21:54.242 | INFO | main:auto_shape:140 - 未找到形状图,退出识别状态 2024-10-19 08:21:55.299 | INFO | main:get_jd_pt_key:415 - 等待获取cookie... Traceback (most recent call last): File "/app/main.py", line 416, in get_jd_pt_key await page.wait_for_selector('#msShortcutMenu', state='visible', timeout=120000) File "/usr/local/lib/python3.10/site-packages/playwright/async_api/_generated.py", line 7999, in wait_for_selector await self._impl_obj.wait_for_selector( File "/usr/local/lib/python3.10/site-packages/playwright/_impl/_page.py", line 397, in wait_for_selector return await self._main_frame.wait_for_selector(**locals_to_params(locals())) File "/usr/local/lib/python3.10/site-packages/playwright/_impl/_frame.py", line 323, in wait_for_selector await self._channel.send("waitForSelector", locals_to_params(locals())) File "/usr/local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 59, in send return await self._connection.wrap_api_call( File "/usr/local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 514, in wrap_api_call raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None playwright._impl._errors.TimeoutError: Page.wait_for_selector: Timeout 120000ms exceeded. Call log: waiting for locator("#msShortcutMenu") to be visible

2024-10-19 08:23:55.430 | ERROR | main:main:517 - 获取pt_key失败 2024-10-19 08:23:55.684 | INFO | utils.tools:send_msg:332 - 发送消息到 https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ac3隐私隐私隐私ef, 响应:{'errcode': 0, 'errmsg': 'ok'}

第一个号获取正常。 我第二个号,自动滑块跟失败都失败,也不会出短信验证码,是哪里没设置好?