PixivUtil2
PixivUtil2 copied to clipboard
Login/Download Issues see here (Oct-20)
Edited by @Nandaka: Please follow this step first
https://github.com/Nandaka/PixivUtil2/wiki#pixiv-login-using-cookie
https://github.com/Nandaka/PixivUtil2/wiki#fanbox-login-using-cookie
Prerequisites
Description
Trying to start PixivUtil to get pictures, connection fails
Steps to Reproduce
Start up configured PixivUtil2
Expected behavior:
Program starts normally, downloads work
Actual behavior:
Cannot Login! press enter to exit
2020-10-14 09:01:16,420 - PixivUtil20201009-beta1 - INFO - ###############################################################
2020-10-14 09:01:16,420 - PixivUtil20201009-beta1 - INFO - Starting with argument: [E:\conf\pixiv\pixivutil\PixivUtil2.exe].
2020-10-14 09:01:16,423 - PixivUtil20201009-beta1 - INFO - Setting log level to: DEBUG
2020-10-14 09:01:16,423 - PixivUtil20201009-beta1 - INFO - No default cookie jar available, creating...
2020-10-14 09:01:16,565 - PixivUtil20201009-beta1 - INFO - Using default DB Path: E:\conf\pixiv\pixivutil\db.sqlite
2020-10-14 09:01:16,567 - PixivUtil20201009-beta1 - INFO - Using Username: nhorus
2020-10-14 09:01:16,567 - PixivUtil20201009-beta1 - INFO - Trying to log in with saved cookie
2020-10-14 09:01:16,765 - PixivUtil20201009-beta1 - ERROR - Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.<locals>.httperror_seek_wrapper'>, <httperror_seek_wrapper (urllib.error.HTTPError instance) at 0x41b9fa0 whose wrapped object = <HTTPError 403: 'Forbidden'>>, <traceback object at 0x041E3148>)
2020-10-14 09:01:16,767 - PixivUtil20201009-beta1 - ERROR - Traceback (most recent call last):
File "PixivUtil2.py", line 1077, in doLogin
last_image_id = -1
File "PixivBrowserFactory.pyc", line 317, in loginUsingCookie
File "PixivBrowserFactory.pyc", line 206, in open_with_retry
File "mechanize\_mechanize.pyc", line 253, in open
File "mechanize\_mechanize.pyc", line 309, in _mech_open
mechanize._response.get_seek_wrapper_class.<locals>.httperror_seek_wrapper: HTTP Error 403: Forbidden
2020-10-14 09:01:16,767 - PixivUtil20201009-beta1 - ERROR - Cannot Login!
2020-10-14 09:01:16,768 - PixivUtil20201009-beta1 - ERROR - Traceback (most recent call last):
File "PixivUtil2.py", line 1077, in doLogin
last_image_id = -1
File "PixivBrowserFactory.pyc", line 317, in loginUsingCookie
File "PixivBrowserFactory.pyc", line 206, in open_with_retry
File "mechanize\_mechanize.pyc", line 253, in open
File "mechanize\_mechanize.pyc", line 309, in _mech_open
mechanize._response.get_seek_wrapper_class.<locals>.httperror_seek_wrapper: HTTP Error 403: Forbidden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "PixivUtil2.py", line 1278, in main
parsed_page = BeautifulSoup(page.read().decode("utf-8"), features="html5lib")
File "PixivUtil2.py", line 1084, in doLogin
raise
PixivException.PixivException: 0 Cannot Login!, hasDumpPage=N, pageData=None
Versions
You can get this information from executing PixivUtil2.py --help
.
Latest version available in https://github.com/Nandaka/PixivUtil2/releases
I just got this recently also, from the latest PixivDownloader
Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.
I have the same problem
Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.
Same problem here too.
Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.
Maybe because of this, Pixiv want you to change your password?
Also, update your cookie again, looks like the format changed.
Works fine after changing my password and updating the cookie.
Same problem.
I had tried change PHPSESSID and not working.
@polujm9 try to update your password in pixiv website and try to match the useragent
value with your browser.
Changing my password on the website and updating my config with the new PW, PHPSESSID, and UA appear to have fixed this for me. Edit: FWIW, I did not receive anything from Pixiv that would have prompted me/suggested that I should change my password.
Changing Password works for me.
Changing password, changing session, none of that worked for me. I ended up creating a new account, and that worked just fine.
Interestingly the new session ID was shorter since it wasn't preceded by '10XXXXXX_'.
Same error here too. I changed my PW, PHPSESSID and User Agent, but i still get the error:
Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.
.httperror_seek_wrapper'>, <httperror_seek_wrapper (urllib.error.HTTPError instance) at 0x3bf03d0 whose wrapped object = <HTTPError 403: 'Forbidden'>>, <traceback object at 0x03BE95C8>) Cannot Login!
I also gone through this: https://github.com/Nandaka/PixivUtil2/issues/505
Anything else i can try?
I logged in and the prompt to change password appears, so I changed with that and updated the cookie (which formatted differently) and it works again. Maybe try to logout and login back and see if the prompt appears. Perhaps a simple password change if you're already logged in wouldn't work. Can't guarantee though as I didn't try it myself.
Did not get prompt to change password. Changed nonetheless, new cookie, does not work. :(
Didn't get the prompt, but changing the password worked. Added the new cookie and password to the config and it worked just as always. Back to pulling from multiple instances at once with no issues.
I have the same problem like everyone above.
From the looks of it, it seems the solutions seem to be hit or miss,
Unfortunately, none of the solutions worked for me.
Tried changing password and updating the cookie and user agent - no luck
Hell, I tried making a new account and that didn't work either.
I also got it to work by changing my Pixiv password and then updating my configuration with the new password, new cookie and current user agent.
I got the same problem:
Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.<locals>.httperror_seek_wrapper'>, <httperror_seek_wrapper (urllib.error.HTTPError instance) at 0x3e7b3d0 whose wrapped object = <HTTPError 403: 'Forbidden'>>, <traceback object at 0x03E81AC8>) Cannot Login!
and changing password doesn't work
I currently test out a way to download in full mode normally When you change the password and play this screen, use F12 to directly view the new PHPSESSID Can change the same password Don’t go to the pixiv homepage to check the PHPSESSID Will not display the number of ID "XXXXXXX_" but only the command line after _ EDIT: also check your browser user-agent to match with config.ini
Current solution
Same issue. I've done the following:
logged out and back in. No prompt to change password. Updated cookie/useragent Changed password Updated cookie/useragent again no luck; problem persists.
The error I get is the same as the others:
Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.<locals>.httperror_seek_wrapper'>, <httperror_seek_wrapper (urllib.error.HTTPError instance) at 0x7f8fa3adae18 whose wrapped object = <HTTPError 403: 'Forbidden'>>, <traceback object at 0x7f8fa3929348>) Cannot Login!
I'm adding my comment here with the same issue and the previous steps didn't work:
-Logged out and back in (I was not prompted to make any password change)
- Changed password
- Logged out and back in
- Copy new cookie -Updated user agent
i don't want to create a new account so I didn't do that.
Error code:
'Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class.
I managed to save the page retrieved in
doLogin
and it turns out to be as the picture above shows.
Looks like they put more effort in anti-scraping.
it seems to be cloudflare.... geez. I hate cloudflare.
@polujm9 try to update your password in pixiv website and try to match the
useragent
value with your browser.
Worked for me using v20201009-beta1 and I used Chrome 86.0.4240.75 to get my PHPSESSID value
First I changed my password and PHPSESSID cookie value to see if that alone would work. It did not.
Then used this site (https://www.whatismybrowser.com/detect/what-is-my-user-agent) to detect my useragent and replaced whatever was in the config.ini WORKED
@polujm9 try to update your password in pixiv website and try to match the
useragent
value with your browser.Worked for me using v20201009-beta1 and I used Chrome 86.0.4240.75 to get my PHPSESSID value
First I changed my password and PHPSESSID cookie value to see if that alone would work. It did not.
Then used this site (https://www.whatismybrowser.com/detect/what-is-my-user-agent) to detect my useragent and replaced whatever was in the config.ini WORKED
Hit or miss for sure... using v20201009-beta1 and I used Chrome 86.0.4240.75 (Latest) I go to Pixiv website to change password with no prompt encountered Put in my new password along with the new cookie using Chrome in the config and logged out Headed over to detected my useragent and copy what was there and replaced in the config Open up the downloader and still same error results...I also tried on two different accounts, no avail. (Giving me the same error) Something must've changed recently no...?
I managed to get it working again. I had no prompt to change my password, but doing so provided me with a new PHPSESSID that is in a new format. The old format had 6 digits and an underscore prepended (######_RestOfID). The new format does not.
Note that I had previously attempted setting a matching useragent and logging out and in to generate a new PHPSESSID. Before I changed my password, it simply gave me a new PHPSESSID in the old format, which did not work.
Changed password, updated cookie, logged out. Problem persists.
Keeping the SESSID unique auth token (the part that is after the underscore) and removing your user ID as well as the underscore will allow you to log in just fine, for now at least. You'll still have to manually provide your user ID to PixivUtil for this to work. I suspect this is part of #807 as user IDs classify as trackable information but @bluerthanever raised a valid concern with the verification process. pixiv probably didn't even think ahead nor test it at all as usual.
I cannot guarantee this will help solve the issue as I tried both a rather old release and the latest one, both run into #817 when trying to download something. Nothing seems to generate the new format or any prompt for that matter, no matter the browser, method or password complexity so for now stuck with this like everyone else encountering it.
If someone manages to grab a link to the password change prompt, maybe that would also force reformat the stored cookie instead of pushing the ID to force a manual check which is what seems to be happening.
Ok. I didn't do any test yesterday. But here is what I did, and I have no problem for now.
- Deleted all cookie in browser with extension, not logging out (not sure if there are any differences)
- Logged in again in browser, somehow this time they asked for recaptcha, and password update.
- Updated the new PHPSESSID in config.in and viola.
Edit: Didn't try out any of the menu items yet. And the new PHPSESSID seems to be in new format as well.
Changed password and re-login Updated the new PHPSESSID in config.in Updated user agent Problem persists.
try to login in incognito mode? ensure the new cookie value doesn't have _ in it (e.g. 189000_abcdefghijkalmnoxxxx <- old version)
I can't get it to work. Tried to export the cookie through different browsers, even android but still get one with an underscore (e.g. 189000_abcdefghijkalmnoxxxx). If i remove the "189000_" from the cookie i get
Trying to log in with saved cookie Login successful. Unable to get User Id, please check your cookie.
Also changed the User Agent, but it doesn't seem to matter, at least on my side... I already changed my PW, didn't get me a "good" cookie.