RicterZ / nhentai

nhentai doujinshi downloader
http://nhentai.net
MIT License
804 stars 112 forks source link

Cannot get your username, please check your cookie #262

Closed Blep84 closed 1 year ago

Blep84 commented 1 year ago

Hi All

I have checked the other issues and fixes but none seem to work and I am not sure if it is me being an ID10t. after logging in with Chrome to get the cookie info from - https://nhentai.net/search/?q=english cookieinfo

I add my useragent to my command (nhentai --cookie "csrftoken=xxx; sessionid=xxx; cf_clearance=xxx" --useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" ) run it and I get the cookie saved promt, I then try run a tester (nhentai --id=123855) and that is when I get the error. cannot get username

Am I missing anything? I did try pip install --upgrade nhentai as well but no change.

Appreciate any help, Thanks

SandyRodgers-2017 commented 1 year ago

If your still having problems. It seems that your command is wrong. It is --cookie="csrftoken=xxx;sessionid=xxx;cf_clearance=xxx" Also I set the user agent in a separate command myself. You can only use your cookie for a short time as well. If you are using a vpn make sure that the browser that you used to sign into nhentai and your computer both have the same ip address. If you are on linux, you can use my bash script. Change below files extension to .sh and give it execute permission. Use -h to pull up a help screen with the commands. nhentai_downloader.txt

Blep84 commented 1 year ago

Thanks @SandyRodgers-2017, splitting my useragent command and correcting my cookie info sorted me out!