icepage / AutoUpdateJdCookie

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

docker运行,获取变量后不更新 #25

Open nosferatu747 opened 1 week ago

nosferatu747 commented 1 week ago

config.py如下:

# JD用户信息
user_datas = {
    "18xxxxxxxxx": {
        "password": "xxxxxx",
        "pt_pin": "xxxxxxx"
    }
}

# ql信息
qinglong_data = {
    "url": "https://xxx.ixxxxx.xxx/",
    "client_id": "4xxxxxxxxd",
    "client_secret": "idxxxxxxxxxxxxxxxxxxxxxxxC"
#    "username": "",
#    "password": "",
    # 可选参数,QL面板的sessionid,主要是避免抢占QL后台的登录。需要在浏览器上,F12上获取Authorization的请求头。如果为空或不设置则账号密码登录
#    "token": ""
}

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

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

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

# 定时器
cron_expression = "47 21 * * *"

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

# 是否开启发消息
is_send_msg = False
# 更新成功后是否发消息的开关
is_send_success_msg = True
# 更新失败后是否发消息的开关
is_send_fail_msg = True
# 配置发送地址
send_info = {
    "send_wecom": [
    ],
    "send_webhook": [
    ],
    "send_dingtalk": [
    ],
    "send_feishu": [
    ]
}

# sms_func为填写验信验证码的模式,有3种可选,webhook待实现
# no 关闭短信验证码识别
# manual_input 手动在终端输入验证码
# TODO: webhook 调用api获取验证码,可实现全自动填写验证码
sms_func = "manual_input"
# sms_webhook = "https://127.0.0.1:3000/getCode"

docker部署运行如下:

t@ra6f1:~# docker run -v /root/data/docker_data/aujc/config.py:/app/config.py icepage/aujc:latest
2024-09-26 21:45:22.658 | INFO     | __main__:run_scheduled_tasks:17 - AutoUpdateJdCookie运行中
2024-09-26 21:45:22.661 | INFO     | __main__:run_scheduled_tasks:19 - 下次更新任务时间为2024-09-26 21:47:00
2024-09-26 21:47:00.481 | INFO     | main:get_ql_api:434 - 开始获取QL登录态......
2024-09-26 21:47:00.484 | INFO     | main:get_ql_api:440 - 使用client_id和client_secret登录......
2024-09-26 21:47:00.790 | INFO     | main:get_ql_api:444 - client_id和client_secret正常可用......
2024-09-26 21:47:01.049 | INFO     | main:main:484 - 获取环境变量成功
2024-09-26 21:47:01.868 | INFO     | __main__:run_scheduled_tasks:25 - 下次更新任务时间为2024-09-27 21:47:00

为什么在main:main:484 - 获取环境变量成功,不更新呢?大佬能看出我哪里配置错误,或有可能是什么问题吗?

nosferatu747 commented 1 week ago

看了svjdck项目,知道了需要手动禁用CK才会更新。 现在日志 2024-09-27 12:59:33.472 | INFO | main:auto_move_slide:73 - 第4次尝试自动移动滑块中... 2024-09-27 12:59:40.626 | INFO | main:auto_move_slide:73 - 第5次尝试自动移动滑块中... 2024-09-27 12:59:48.509 | INFO | main:sms_recognition:293 - 开始短信验证码识别 2024-09-27 12:59:48.523 | INFO | main:get_jd_pt_key:410 - 等待获取cookie... linux无GUI滑块参数slide_difference如何调,看不出来是没到还是过了,第5次是成功了吗,进入开始短信验证吗识别,但是没有收到短信,一直显示等待获取cookie...