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

Failed headless detection #21

Open
mat926 opened this issue Jan 8, 2024 · 4 comments
Open

Failed headless detection #21

mat926 opened this issue Jan 8, 2024 · 4 comments

Comments

@mat926
Copy link

mat926 commented Jan 8, 2024

I launch my browser like this:

with sync_playwright() as p:
   browser = p.chromium.launch_persistent_context(
            './temp',
            headless = True,
            args= ['--headless=new']
        )
    page = browser.pages[0]
    stealth_sync(page)
    page.goto('https://arh.antoinevastel.com/bots/areyouheadless')

However it's failing the Headless bot detection.
https://arh.antoinevastel.com/bots/areyouheadless
image

@thoughtfuldata
Copy link

@mat926 did you find a fix?

@mat926
Copy link
Author

mat926 commented Mar 7, 2024

@mat926 did you find a fix?

No I'm still having this error

@deedy5
Copy link

deedy5 commented Apr 4, 2024

Add args=["--disable-blink-features=AutomationControlled"]:

with sync_playwright() as p:
   browser = p.chromium.launch_persistent_context(
            './temp',
            headless = True,
            args=["--disable-blink-features=AutomationControlled"],
        )
    page = browser.pages[0]
    stealth_sync(page)
    page.goto('https://arh.antoinevastel.com/bots/areyouheadless')

@iloveitaly
Copy link

The above solution isn't working for me.

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