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

can't work #3

Closed
ChaosTong opened this issue Apr 19, 2016 · 2 comments
Closed

can't work #3

ChaosTong opened this issue Apr 19, 2016 · 2 comments

Comments

@ChaosTong
Copy link

Traceback (most recent call last):
File "./spider.py", line 82, in
search()
File "./spider.py", line 76, in search
users = response.json()['list']
KeyError: 'list'

@LiuRoy
Copy link
Owner

LiuRoy commented Apr 21, 2016

@ChaosTong 我猜是因为没有登陆成功,可能的原因是LOGIN_HEADER中的Cookie过期了,这个Cookie是由js生成用来标注客户端的,你可以用浏览器抓一下请求,把Cookie重写一下。当然用户名和密码也得配置正确。

@ChaosTong
Copy link
Author

是的,重写LOGIN_HEADERS,设置成自己的相关设置就OK了。

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