运行错误:IndexError: list index out of range
Closed this issue · 4 comments
Sheng-Charles commented
Exception has occurred: IndexError
list index out of range
File "I:\huanjingbianliang\123123123\main.py", line 249, in main
_headers['x-csrf-token'] = re.findall(re_token,_headers['cookie'])[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
File "I:\huanjingbianliang\123123123\main.py", line 272, in
main(User_info(i))
IndexError: list index out of range
旧版本一直闪退,刚更新后提示这个,但是cookie是刚刷新出来的,也加了转译。请问这个怎么解决?我发给GPT试着自己解决但实在是看不懂::(
caolvchong-top commented
这个是cookie格式错误 或是 cookie中缺少 ct0 字段
程序所需的cookie中必须要有 auth_token 与 ct0 两个字段,部分网页请求的cookie可能没有 ct0 字段,可以检查一下你复制的cookie内容
格式可以参见这里 #10
Sheng-Charles commented
caolvchong-top commented
看一下ct0的末尾有加分号吗?
ct0=xxxxxxxxxx;
Sheng-Charles commented
牛比!可以了!!谢谢谢谢