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

使用example报错问题:pixivpy3.utils.PixivError: [ERROR] auth() failed! check username and password. #273

Open
hhhuskytc opened this issue Jun 14, 2023 · 1 comment

Comments

@hhhuskytc
Copy link

我在使用example程序时返回错误导致程序运行失败,错误如下:
Traceback (most recent call last):
File "D:\python_prj\2023_06_07\test.py", line 5, in
api.login("xxxx", "bbbb") # Not required
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python311\Lib\site-packages\pixivpy3\api.py", line 84, in login
return self.auth(username=username, password=password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python311\Lib\site-packages\pixivpy3\api.py", line 129, in auth
raise PixivError(
pixivpy3.utils.PixivError: [ERROR] auth() failed! check username and password.
HTTP 400: {"has_error":true,"errors":{"system":{"message":"Invalid grant_type parameter or parameter missing","code":1508}},"error":"invalid_grant"}
账号密码是可以在网页进行正常登陆的,所以应该不是账号密码错误的问题,还请各位大神指点一二
仅将example下载到本地进行运行,解除注释了api.login()函数并输入了账号密码,电脑同时挂着梯子,不知道问题出在哪里

@Xdynix
Copy link
Collaborator

Xdynix commented Jun 14, 2023

参考 #158 ,已经不能用用户名+密码登录了。需要先用其他方法获取refresh_token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants