Closed hereTac closed 1 year ago
Please use interface mode, You must add headless=False. If you use it on linux or docker, use XVFB.
I apologize for any confusion. Let me explain again. I used headless=True
and XVFB on Linux, then start it by running xvfb-run python3 test_s.py
, cloudflare response the access denied
page. However, when I use headless=False
and the interface mode on Ubuntu Desktop, that works fine and it give me the correct target page. @vvanglro
You can only pass the challenge with headless=false, if you are using a server with an interface, you don't need to use XVFB.
In my case, my purpose is to run the script on Linux without an interface, so must be XVFB
, is it right? But, unfortunated, is can not pass the challenge. (Just tested on Ubuntu Desktop and it is good with an interface.
try new code.
pip install git+https://github.com/vvanglro/cf-clearance.git@main
Try it already yesterday. I build the test code in git clone https://github.com/vvanglro/cf-clearance
.
Works fine, doesn't reproduce your problem.
It is all good while using
headless=False
, got error when useheadless=true
, started it withxvfb-run python3 test_s.py
.Here is the whole source code .