1

I'm attempting to follow this guide to make Chrome headless undetectable.

https://intoli.com/blog/making-chrome-headless-undetectable/

The problem is, it seems to involve using Javascript and running scripts through the command prompt. I'm hoping to create an executable Python script with Selenium that I could use on multiple computers without manually setting anything up through command lines. I know I can reference Javascript files in Python, but this guide uses Javascript and command lines for everything and I can't figure out how to apply it to my Python project.

Is there a way to make Chrome headless undetectable in a more portable way when using Python and Selenium?

1 Answers1

0

Yes you can do that by using options :

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
cls.browser = webdriver.Chrome(
        executable_path=str(BASE_DIR / "webdrivers" / "chromedriver"),
        options=chrome_options,
    )

Reference : Chrome Headless

Gaëtan GR
  • 1,380
  • 1
  • 5
  • 21