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

使用api登录失败 #49

Open
ztzheng100 opened this issue Jan 27, 2021 · 1 comment
Open

使用api登录失败 #49

ztzheng100 opened this issue Jan 27, 2021 · 1 comment

Comments

@ztzheng100
Copy link

ztzheng100 commented Jan 27, 2021

from lanzou.api import LanZouCloud

lzy = LanZouCloud()
code = lzy.login('username','pwd')
if code == LanZouCloud.SUCCESS:
print("成功")
else:
print(code)

在源码中 lanzou/api/core.py,下面这句执行失败,是否是应为滑动块的验证
html = self._post(self._account_url, login_data, headers=phone_header)

@zaxtyson
Copy link
Owner

zaxtyson commented Jan 29, 2021

哈哈,对,是因为验证问题, 这个方法已经弃用了. 原来没有验证码, 结果官方加了验证来搞我们, 就换到APP端的header, 然后官方把APP端也加了验证, 就不打算再去整了, 直接 cookie 登录.

参见: https://github.com/zaxtyson/LanZouCloud-API/wiki/0x02-%E7%99%BB%E5%BD%95%E5%92%8C%E6%B3%A8%E9%94%80#loginusername-passwd--%E5%B7%B2%E5%BC%83%E7%94%A8-%E8%AF%B7%E4%BD%BF%E7%94%A8-cookie-%E7%99%BB%E5%BD%95

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