I'm consistently seeing Chrome 95 or 96 in the user agent, despite having the latest versions of dependencies installed. If I remove stealth_sync, the user agent contains HeadlessChrome 133, which looks correct.
Any guidance on the following would be appreciated:
- why is such an old user agent being used by default?
- how do I provide a more recent user agent in a way that remains stealthy?
This is the basic example I'm using:
from playwright.sync_api import sync_playwright
from playwright_stealth import stealth_sync
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
stealth_sync(page)
page.goto('https://bot.sannysoft.com/')
page.wait_for_timeout(5000)
page.screenshot(path="example_with_stealth.png", full_page=True)
browser.close()
Thanks for your guidance.
I'm consistently seeing Chrome 95 or 96 in the user agent, despite having the latest versions of dependencies installed. If I remove
stealth_sync, the user agent contains HeadlessChrome 133, which looks correct.Any guidance on the following would be appreciated:
This is the basic example I'm using:
Thanks for your guidance.