single-file-cli icon indicating copy to clipboard operation
single-file-cli copied to clipboard

bypass cloudflare browser check

Open gemini0x2 opened this issue 1 year ago • 2 comments

How can bypass the cloudflare browser check:

"Checking if the site connection is secure site.com needs to review the security of your connection before proceeding."

I know that chromedriver should be able to byapass this check, but I'm not sure what args to use. I have tried the following, but no luck:

  • "block-scripts": false, (Nothing happens with this")

  • "user-agent": "webdriver-chromium", (when I use this arg I get.. Error 1010 Ray ID: 82401f3f790b19aa • 2023-11-10 17:47:41 UTC Access denied What happened? The owner of this website (site.com) has banned your access based on your browser's signature (82401f3f790b19aa-ua60).)

I think the solution is in "browser-args", I tried changing the user agent to --user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3 and it worked, but then it crashes after crawling a few pages.

Is there a way to launch single-file with undetected-chromedriver

gemini0x2 avatar Nov 10 '23 19:11 gemini0x2

example website and a command (Linux):

$ docker run singlefile 'https://www.phind.com/' > /tmp/phind.html

I don't know how to resolve the issue.

www.phind.com

Checking if the site connection is secure

www.phind.com needs to review the security of your connection before proceeding.
Enable JavaScript and cookies to continue

@gemini0x2 Blocking scripts certainly won't help with the access since the Cloudflare's check explicitly requires Javascript.

in-plaintext avatar Dec 09 '23 11:12 in-plaintext

anyone got a solution for this?

/edit

I found a solution:

using the chrome extension: https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc to get my cookies.

and the cli parameter for cookie generated file: --browser-cookies-file

Klar avatar Jul 22 '24 20:07 Klar