undetected-chromedriver
undetected-chromedriver copied to clipboard
Undetected-Chromedriver not working with compiled .exe version.
Hi, I compile my python program with cx_freeze after compile i have tried so many times to run undetected chromedriver but its never worked! But Selenium is working fine without any issue.
When i run with undetected chromedriver it shows a error that init() got an unexpected keyword argument 'driver_executable_path'
This error shows up only when i convert the python program to exe. I also tried py2exe same issue happens.
i using pyinstaller without arg one-file
i using pyinstaller without arg one-file
Even if it's run properly it can't bypass the cloudflare on complied version also if we add options it run like normal selenium. Can you please help me to solve these issue?
driver = uc.Chrome(use_subprocess=True)
driver = uc.Chrome(use_subprocess=True)
It worked thanks!
Also can you help me how to hide the console with compiled version for undetected chromedriver, i have tried freeze_support() on the top of the code also i tried chrome_service.creationflags = CREATE_NO_WINDOW but it doesn't worked for me, it always open a blank console.
Thanks for your reply
for cx_freeze on Windows use base = "Win32GUI"
import cx_Freeze
exe = [cx_Freeze.Executable("main.py", base = "Win32GUI")]
cx_Freeze.setup(
name = "Name",
version = "1.0",
options = {"build_exe": {"packages": [],
"include_files": []}},
executables = exe
)
for pyinstaller:
pyinstaller --noconsole yourscript.py
driver = uc.Chrome(use_subprocess=True)
It worked thanks!
Also can you help me how to hide the console with compiled version for undetected chromedriver, i have tried freeze_support() on the top of the code also i tried chrome_service.creationflags = CREATE_NO_WINDOW but it doesn't worked for me, it always open a blank console.
Thanks for your reply
for cx_freeze on Windows use base = "Win32GUI"
import cx_Freeze exe = [cx_Freeze.Executable("main.py", base = "Win32GUI")] cx_Freeze.setup( name = "Name", version = "1.0", options = {"build_exe": {"packages": [], "include_files": []}}, executables = exe )
for pyinstaller:
pyinstaller --noconsole yourscript.py
driver = uc.Chrome(use_subprocess=True)
It worked thanks! Also can you help me how to hide the console with compiled version for undetected chromedriver, i have tried freeze_support() on the top of the code also i tried chrome_service.creationflags = CREATE_NO_WINDOW but it doesn't worked for me, it always open a blank console. Thanks for your reply
Yes i always compile with Win32GUI in Cx_Freeze But it doesn't not worked for me.
If you have other solution please help us.
Thanks again.
@mechxer
Also can you help me how to hide the console with compiled version for undetected chromedriver i tried chrome_service.creationflags = CREATE_NO_WINDOW but it doesn't worked for me, it always open a blank console
This is non-trivial because UC creates its own service and you can't simply set the creationflags
to an existing service.
Please check #623 where you'll find how to make it work.