-
Notifications
You must be signed in to change notification settings - Fork 258
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
Login/Download Issues see here (Oct-20) #814
Comments
I just got this recently also, from the latest PixivDownloader Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper'>, <httperror_seek_wrapper (urllib.error.HTTPError instance) at 0x4282d60 whose wrapped object = <HTTPError 403: 'Forbidden'>>, <traceback object at 0x04292A68>) |
I have the same problem Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper'>, <httperror_seek_wrapper (urllib.error.HTTPError instance) at 0x3835bb0 whose wrapped object = <HTTPError 403: 'Forbidden'>>, <traceback object at 0x03864968>) |
Same problem here too. Error at doLogin(): (<class 'mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper'>, <httperror_seek_wrapper (urllib.error.HTTPError instance) at 0x3b60778 whose wrapped object = <HTTPError 403: 'Forbidden'>>, <traceback object at 0x03B6F0C8>) |
Same problem. I had tried change PHPSESSID and not working. |
@polujm9 try to update your password in pixiv website and try to match the |
Changing my password on the website and updating my config with the new PW, PHPSESSID, and UA appear to have fixed this for me. |
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:
I also gone through this: #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. |
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: |
Current solution |
Same issue. I've done the following: logged out and back in. No prompt to change password. The error I get is the same as the others: |
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)
i don't want to create a new account so I didn't do that. Error code: |
it seems to be cloudflare.... geez. |
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... |
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.
Edit: |
For firefox: |
I'm having this issue too. I'm on Mac tho. |
use gallery-dl, its better |
@userskill The usage is in the FAQ of the Readme, Question# 3. @afterdelight Your comment here is not helpful. While gallery-dl supports pixiv, for content marked as 18+ gallery-dl will still want login credentials. The |
here, read this how to login to pixiv with gallery-dl. i havent have a successful attempt with pixivutil2 |
I know I commented early on in this thread saying that updating my password worked for me, but I seem to be having troubles again. |
Why was this necessary? |
Having performed the steps in #814 (comment), on the page in the screenshot, I am still getting the incorrect cookie. Also, the comments right below this linked one state that multiple changes may be needed in order to get the correct format of cookie/PHPSESSID. And performing the steps in https://github.com/Nandaka/PixivUtil2#faqs Q3 do not result in success either... EDIT: well, I poked around some of the other closed threads about login issues. I toggled my language setting on Pixiv back and forth a few times, and suddenly the cookie works. Then it prompted me to go to the API page and grab the code from the callback request. Things seem to be working for now. Edit 2: Well, after a while of working, a started getting some 5xx errors and captchas from CloudFlare. Did the whole jig again with password resets, language updates, logging in/out, etc; additionally, tried this method linked in another issue. |
Created wiki page for login using cookie for pixiv and fanbox. I hope this is useful https://github.com/Nandaka/PixivUtil2/wiki#pixiv-login-using-cookie Please open an issue request if you have any feed back to the wiki page. |
Wiki page looks good. |
Weird, I didn't see any cloudflare, and the script didn't have special handling for it (except for oAuth validation). Can you try to run using vpn or proxy to check if it is blocked on ip address level (or if you can run from different network/isp). |
Tested via socks5 proxy through an SSH tunnel to two of my VPSs, one in AWS, one in GCP. Looking around on other Github projects, I think it may be tied to some other cookies like |
Thank you for going above and beyond here, hopefully this will help folks out who are having a difficult time logging in! I have the scripts running right now but once it's finished I will test on linux and report back if something breaks! |
Seconded and highly agreed, thank you for all the work you do @Nandaka - it's much appreciated. An update on my login situation: I've got the most recent commit and tested the new solution with it. Still getting 403s, but I was able to do some more in-depth debugging..
This allowed me to see the output of the page that CF is serving me with the 403 (It seems the except clause was causing it to just fail outright and not dump the page.) I'm still doing some digging to see what I can do to get around it, but maybe my account (or IP) is just blacklisted or something... One last thing! When invoking Going to try and wrap my head around the oauth bits and open with cookie.. Could maybe a plain login suffice at that stage? IE, no refresh/auth token, use oauth to generate them, insert into config, attempt login with cookie, fails and presents a login page, attempt a regular login with UN/PW? Sorry if I'm rambling at this point. Just wanted to get some info out. |
yeah, because I didn't get the Cloudflare error, so I can't help on this part. There is a library to handle the cloudflare thing. Alternatively, you can also try to replace mechanize with requests library and send me the pull request 😛 |
If you're willing to review/accept such a large change to the project, then I'm more than willing to investigate & implement it! Though, like I mentioned, still want to do some more digging to see if I can work around it without rewriting the entire application 😆 |
I've encountered this Cloudflare issue with other sites. Using requests won't fix it. Copying the exact HTTP request (down to identical headers and what not) will still trigger it. They did something captcha-ish to detect automated tools from humans. Things like cloudscraper can work sometimes but that's not a guarantee. I ended up using |
@jwshields if it is limited to https://github.com/Nandaka/PixivUtil2/blob/master/PixivBrowserFactory.py, then should be ok. It has additional code PixivHelper.py to handle proxy (this might need to be change too, or just move it inside the PixivBrowserFactory.py) The on in PixivDownloadHandler is just to catch the HTTPError. Not sure if you can do shortcut on the helper to use the cloudscraper request, instead of mechanize.request for testing. |
I've been a bit busy with work the last few days, but should have some time freeing up tomorrow and over the weekend; I'll do a deep dive into it all then. |
Version 20220924 Getting basically the same error as in when trying to log in #1172
Error stays the same regardless of if the credentials are provided in the terminal or the config file. First version on which I encountered this was way back in pixivutil20220311-beta3 |
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
Versions
You can get this information from executing
PixivUtil2.py --help
.Latest version available in https://github.com/Nandaka/PixivUtil2/releases
The text was updated successfully, but these errors were encountered: