Skip to content
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

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

Open
kunambi opened this issue Jul 24, 2023 · 6 comments
Open

Comments

@kunambi
Copy link

kunambi commented Jul 24, 2023

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:

  • with and without Proxy/VPN,
  • logging in/out to re-set the cookies
  • also tried to delete cookies and logging in again
@Spyridion
Copy link
Contributor

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
Copy link
Author

kunambi commented Aug 2, 2023

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

@manowar222
Copy link

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

Did you manage to solve it?

@kunambi
Copy link
Author

kunambi commented Feb 14, 2024

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
Copy link
Author

kunambi commented May 15, 2024

Bump

Any updates on this issue?

@Sarajevo1914
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants