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

实现上传知乎头像功能报错 #11

Open
wozuiku opened this issue Apr 25, 2017 · 4 comments
Open

实现上传知乎头像功能报错 #11

wozuiku opened this issue Apr 25, 2017 · 4 comments

Comments

@wozuiku
Copy link

wozuiku commented Apr 25, 2017

  1. 代码逻辑:手机通过fiddler代理访问知乎,在手机知乎app上传头像,通过fiddler抓包。
    在代码里使用抓包得到的cookie实现上传头像功能

  2. 代码:
    详见附件
    其中avatar.txt是实现代码(py文件不让上传,麻烦下载后后缀名改为py),avatar.jpg是要上传的头像,fiddler.txt是fiddler抓包数据

  3. 报错
    avatar_status = 400
    avatar_text = {"error":{"message":"参数错误","code":4000}}

avatar.txt
avatar
fiddler.txt

@wozuiku
Copy link
Author

wozuiku commented Apr 25, 2017

如果提示以下错误信息,麻烦联系我要下最新的抓包数据,我的微信:52970496。谢谢各位了
avatar_status = 401
avatar_text = {"error":{"message":"登录令牌已失效","code":101}}

@lzjun567
Copy link
Owner

请求的url是多少

@lzjun567
Copy link
Owner

还有你的代码呢

@wozuiku
Copy link
Author

wozuiku commented Apr 25, 2017

url:https://api.zhihu.com/people/self/avatar
代码上传到附件了

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