upbit / pixivpy

Pixiv API for Python
https://pypi.org/project/PixivPy3/#files
The Unlicense
1.8k stars 147 forks source link

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

Open hhhuskytc opened 1 year ago

hhhuskytc commented 1 year ago

我在使用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 commented 1 year ago

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