Closed akeboshiKOU closed 3 years ago
can you try to remove the 'refresh_token' from the config.ini?
Same thing is happening to me. I tried removing the 'refresh_token' property from the config, but the issue persists
hmm, weird... It is working if I'm running from source using python script, but not if it from the compiled.
Tried running v20210221-beta2 source with latest Python 3.9.2 (64-bit) but still encountered the same error. Tested again with clean config.ini (only Authentication and FFmpeg.exe changed), same issue.
yeah, somehow oAuth only works if you run from source code.
But I'm running from source code :o Somehow double-clicking on PixivUtil2.py doesn't work for me (window closes immediately) so I'm running it from cmd using "python.exe c:\pixivutil\PixivUtil2.py" Am I doing something wrong? Should I try installing Python 32-bit instead?
Downgraded to Python 3.8.8 32-bit, same error when run on CMD or VS Code
i am using WIN10, 64-bit python, and i don't have such problems yet... but when i was testing #907, my situation was that, if i delete the saved refresh token, i would get the same error:
2021-02-10 22:02:27,772 - PixivUtil20210108-beta4 - DEBUG - 400: {"has_error":true,"errors":{"system":{"message":"Invalid grant_type parameter or parameter missing","code":1508}},"error":"invalid_grant"}
2021-02-10 22:02:27,772 - PixivUtil20210108-beta4 - ERROR - Invalid grant_type parameter or parameter missing
2021-02-10 22:02:27,772 - PixivUtil20210108-beta4 - ERROR - NoneType: None
2021-02-10 22:02:27,788 - PixivUtil20210108-beta4 - ERROR - Error getting FANBOX artist by id: ninoseyasunori ==> Failed to login using OAuth
2021-02-10 22:02:27,788 - PixivUtil20210108-beta4 - ERROR - Traceback (most recent call last):
File "C:\PixivUtil2\PixivFanboxHandler.py", line 19, in process_fanbox_artist_by_id
artist = br.fanboxGetArtistById(artist_id)
File "C:\PixivUtil2\PixivBrowserFactory.py", line 914, in fanboxGetArtistById
self.getMemberInfoWhitecube(artist.artistId, pixivArtist)
File "C:\PixivUtil2\PixivBrowserFactory.py", line 642, in getMemberInfoWhitecube
login_response = self._oauth_manager.login()
File "C:\PixivUtil2\PixivOAuth.py", line 238, in login
raise PixivException("Failed to login using OAuth", PixivException.OAUTH_LOGIN_ISSUE)
PixivException.PixivException: 0 Failed to login using OAuth, hasDumpPage=N, pageData=None
but i can get authentication just fine with saved token... so i guess it's probably because your token had expired?
i think the oauth problem is not solved yet, as pixiv changed the api. some say it doesn't accept password now. but you could refer to this issue, i guess you can try to obtain the token manually. https://github.com/upbit/pixivpy/issues/158
also... in pixivutil20210215-beta1, the method to get fanbox artist information should have been changed back to the way that doesn't require oauth already...?
Obtaining 'refresh_token' manually worked! Thanks for the help!
@bluerthanever looks like it is being called from different place. Maybe I'll modify the getMemberInfoWhitecube()
so it also bypass the oAuth.
EDIT: is it called from getMemberPage()' which will call
getMemberInfoWhitecube()` if there is no reference image id...
need different API just to get the member token (user_account
) and background (background_image_url
)
EDIT:
https://www.pixiv.net/rpc/get_profile.php?user_ids=1920354
EDIT: is it called from getMemberPage()' which will call getMemberInfoWhitecube()` if there is no reference image id...
had never noticed this before... and looks like there's another similar issue.
yeah, this specific for FANBOX artist that doesn't have any images in the pixiv profile => then it will encounter this issue to get the user_account (member_token) information. If they have at least 1 image, then different API will be used.
Did you have sloved it? The same question is happening to me today.
no automated way to do it, need to do it manually by following the method described in https://gist.github.com/ZipFile/c9ebedb224406f4f11845ab700124362
Prerequisites
Description
Pulling from a specific FANBOX page (id=57188403) will result in error. Pulling specific posts from the affected page will error as well.
One thing to note, the FANBOX page does not have a corresponding Pixiv page, however I've successfully retrieved posts from other FANBOX pages that do not have any linked Pixiv before. Might be because the page is relatively new? (8-digits, 5--- ----)
Steps to Reproduce
Input: f2 Artist/Creator IDs = 57188403 End page =
[...]
Invalid grant_type parameter or parameter missing Error getting FANBOX artist by id: 57188403 ==> Failed to login using OAuth
Versions
pixivutil20210215-beta1 (with updated PHPSESSID values)