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

login返回302 #3

Closed
hellboywyh opened this issue Dec 17, 2019 · 1 comment
Closed

login返回302 #3

hellboywyh opened this issue Dec 17, 2019 · 1 comment

Comments

@hellboywyh
Copy link

I1217 21:38:07.661310 140286887634752 login.py:163] 验证码校验成功
Traceback (most recent call last):
  File "/home/wyh/wyh/2-else/tickets/12306/start.py", line 31, in <module>
    login.login()
  File "/home/wyh/wyh/2-else/tickets/12306/train/login.py", line 57, in login
    login_response = api.post(request_url, data=request_params).json()
  File "/home/wyh/wyh/2-else/tickets/12306/util/net_util.py", line 59, in post
    'Post request failed response status code is %d url: %s' % (response.status_code, url))
BaseException: Post request failed response status code is 302 url: https://kyfw.12306.cn/passport/web/login

求解答

@janlle
Copy link
Owner

janlle commented Dec 18, 2019

这个问题是12306前端生成logdevice的算法每天都不一样,我代码中用的是一周前的算法所以登录后校验cookie时出错,等会我会修复这个问题的。

@janlle janlle closed this as completed Dec 18, 2019
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