Closed MOHOAzure closed 3 years ago
Emm, illust_ranking
may need auth by default
If you think Pixiv not check auth in the interface, try api.illust_ranking(..., req_auth=False)
The authentication is not only required by illust_ranking function. The above functions all have the same problem.
Besides, I got another error after trying api.illust_ranking(..., req_auth=False).
for illust in json_result.illusts:
TypeError: 'NoneType' object is not iterable
Most APIs on Pixiv require authentication, so we set req_auth=True
by default.
I have not seen the request method without auth on the app. The return is None, it is probably because Pixiv requires authentication, but you did not provide it. (Try login with your own account) If you find out some interface can success access without auth, you can let me know.
Understood. But I wonder why demo example presents that login is not required?
# api.login("username", "password") # Not required
Or it means something else?
Well, some interfaces of the early client did not require token, but sometime later Pixiv changed its strategy.
Currently known, only api.showcase_article()
(the function to pull the background image before login), does not require authentication.
The demo example isn't working. Authentication seems required.
Error message