RicterZ / nhentai

nhentai doujinshi downloader
http://nhentai.net
MIT License
776 stars 110 forks source link

Getting Blocked by Cloudflare even though cookies and useragent are set #289

Open kunambi opened 1 year ago

kunambi commented 1 year ago

Using the latest version, installed through pipx install --include-deps nhentai. Using Windows 10.

Stationary-Work MINGW64 /c/github/nhentai 13:14:48
$ nhentai.exe --cookie="csrftoken=Y41UwUyP47R8Zx5kEwhQwwLBWEKbNYVfpj8Sr5WvYHqqP1B1S3cqTSR9kefMoJg1; sessionid=a44r7p9rptajrn6jwf2o2kyt90m9tzmq; cf_clearance=t1qrZg44yPItYbc53SaNYbZMPgV7u.jSAvPqMB2adUI-1690197125-0-160.0.0"
[13:15:33] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
[13:15:33] cmd_parser: Cookie saved.

Stationary-Work MINGW64 /c/github/nhentai 13:15:33
$ nhentai.exe --useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0"
[13:15:38] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
[13:15:38] cmd_parser: User-Agent saved.

Stationary-Work MINGW64 /c/github/nhentai 13:15:38
$ nhentai.exe --id 195142
[13:15:41] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
[13:15:41] main: Using mirror: https://nhentai.net
[13:15:41] main: Using viewer template "default"
[13:15:42] check_cookie: Blocked by Cloudflare captcha, please set your cookie and useragent

I've tried:

Spyridion commented 1 year ago

Did you set the cookie to the value that has cf_clearance and csrftoken? I also had an issue when I didn't use the latest useragent.

kunambi commented 1 year ago

Yes, as you can see in my example all three cookies were set

manowar222 commented 6 months ago

Yes, as you can see in my example all three cookies were set

Did you manage to solve it?

kunambi commented 6 months ago

Yes, as you can see in my example all three cookies were set

Did you manage to solve it?

Getting the same error. I made sure I had the latest version of the app:

Stationary-Work MINGW64 /c 18:15:17
$ pipx install nhentai --force --include-deps
Installing to existing venv 'nhentai'
⚠️  Overwriting file C:\Users\Owner\.local\bin\normalizer.exe with C:\Users\Owner\.local\pipx\venvs\nhentai\Scripts\normalizer.exe
⚠️  Overwriting file C:\Users\Owner\.local\bin\tabulate.exe with C:\Users\Owner\.local\pipx\venvs\nhentai\Scripts\tabulate.exe
  installed package nhentai 0.5.3, installed using Python 3.10.5
  These apps are now globally available
    - normalizer.exe
    - tabulate.exe
done! ✨ � ✨

Stationary-Work MINGW64 /c 18:15:42
$ nhentai.exe --cookie="csrftoken=9Z6dAYtohCWhLYSmP0mqOhQ9mKN1aVxM3Fyx92gvgSpzJw1a92CUAVB0P3NrzIV4; sessionid=vssnlu8tdkhfllr9wsok9iqkz8r6qtfr; cf_clearance=uxB_QIiG47G7JwalGVvSNmLgkZvdgRePncaHcWvL8Hk-1707930785-1.0-AQh4PLdCR+Z/9A5cUqiV4QpxaBKJNh54DBw1Ivdnum06Gp6aq8jvTwUaIY2jjkOWwBWN2Jku1UUzotdNbISfm0k="
[18:17:18] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
[18:17:18] cmd_parser: Cookie saved.

Stationary-Work MINGW64 /c 18:17:18
$ nhentai.exe --useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0"
[18:17:43] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
[18:17:43] cmd_parser: User-Agent saved.

Stationary-Work MINGW64 /c 18:17:43
$ nhentai.exe --id 195142
[18:17:50] banner: nHentai ver 0.5.3: あなたも変態。 いいね?
[18:17:50] main: Using mirror: https://nhentai.net
[18:17:50] main: Using viewer template "default"
[18:17:50] check_cookie: Blocked by Cloudflare captcha, please set your cookie and useragent
kunambi commented 3 months ago

Bump

Any updates on this issue?

Sarajevo1914 commented 3 months ago

arch installed by clone repo and sudo python setup.py install, if not use sudo dont work.

testting with firefox and brave cookies and user agent.

i have the exact issue since January, I followed the instructions in the readme and how does the one @kunambi do it and I still have the same problem.

I have no idea why I have these errors, maybe it is that we are extracting the data wrong? some type? I don't know, maybe with a script that does this part for us stupid ones it could help us.