pixivpy: HTTP 403
Recently started to occur with the .login() function
pixivpy3.utils.PixivError: [ERROR] auth() failed! check username and password.
HTTP 403. . .
After that, All this html thing
The account credentials are correct. The account has not been banned, i tried with a new one, it doesn’t work either
I hope this is not a silly mistake on my part
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (10 by maintainers)
Commits related to this issue
- WIP: replace requests to cloudscraper, due to #140 — committed to upbit/pixivpy by deleted user 4 years ago
Good job! I will test whether this method is stable as soon as possible.
Release 3.5.10, please upgrade:
pip install PixivPy==3.5.10
The cloudscraper thing still works for me 🤷, but the underlying issue seems to be the user-agent string because changing this line https://github.com/upbit/pixivpy/blob/bcceffc7e1ba73be300ceb339b59b0e84290dae3/pixivpy3/api.py#L83 to
(i.e. just any random string) consistently fixes it as well for me.
The test version has resolved the 403 problem on my side.
Changing this line: https://github.com/upbit/pixivpy/blob/bcceffc7e1ba73be300ceb339b59b0e84290dae3/pixivpy3/api.py#L29 to
from the cloudscraper module seems to “fix” it for me fwiw
I Pulled Master changes to local, it fixes the error 403.
@remiliacn Can this version fix your problem? I did not use a random User-Agent, just changed the version number.
无法在本地复现403问题,功能完全正常,返回值就是正常的json;登陆后其他操作也没有问题
另外说到客户端,重新测试了一下 iOS客户端使用accounts.pixiv.net进行登陆,带recaptcha,登陆和回调链接为下面的两个:
Android客户端解包v5.0.219以后也有了类似的验证方式,另外貌似删除了oauth.secure.pixiv.net接口(没有找到相关内容)
作为参考,原本的请求参数部分和PixivOAuthResponse好像都做了修改
有可能更换了登陆API或者修改了实现方式?(才疏学浅,看得比较粗略