Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range #60

Open
allonmymind opened this issue Oct 31, 2024 · 2 comments
Open

IndexError: list index out of range #60

allonmymind opened this issue Oct 31, 2024 · 2 comments
Assignees

Comments

@allonmymind
Copy link

确定config.py格式正确,不知道为何一直报错
root@Ubuntu:/app/autojd# docker run -i -v $PWD/config.py:/app/config.py icepage/aujc:latest python main.py
2024-10-31 09:38:37.826 | INFO | main:get_ql_api:500 - 开始获取QL登录态......
2024-10-31 09:38:37.826 | INFO | main:get_ql_api:506 - 使用client_id和client_secret登录......
2024-10-31 09:38:39.020 | INFO | main:get_ql_api:510 - client_id和client_secret正常可用......
2024-10-31 09:38:40.320 | INFO | main:main:550 - 获取环境变量成功
Traceback (most recent call last):
File "/app/main.py", line 560, in main
forbidden_users = [x for x in user_info if x['name'] == 'JD_COOKIE' and (x['status'] == 1 or x['value'].rstrip(';').split('pt_pin=')[1] in force_update_pt_pins)]
File "/app/main.py", line 560, in
forbidden_users = [x for x in user_info if x['name'] == 'JD_COOKIE' and (x['status'] == 1 or x['value'].rstrip(';').split('pt_pin=')[1] in force_update_pt_pins)]
IndexError: list index out of range
root@Ubuntu:/app/autojd#

@allonmymind
Copy link
Author

貌似jd_cookie的长度太长会报错,JD_COOKIE的值为“pt_key=123;pt_pin=qaz;&pt_key=456;pt_pin=edc;”删掉几个cookie后就正常了,能否让main.py在根据pt_pin提取pt_key之前通过&分隔符分割后再提取就能解决了。

@icepage
Copy link
Owner

icepage commented Oct 31, 2024

暂不支持不拆分JD_COOKIE,要先拆分后使用 @allonmymind

@icepage icepage self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants