AtuboDad / playwright_stealth

playwright stealth
MIT License
498 stars 64 forks source link

Failed headless detection #21

Open mat926 opened 8 months ago

mat926 commented 8 months ago

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 commented 6 months ago

@mat926 did you find a fix?

mat926 commented 6 months ago

@mat926 did you find a fix?

No I'm still having this error

deedy5 commented 6 months ago

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 commented 4 months ago

The above solution isn't working for me.