I have been using puppeteer for a while, but decided to convert to playwright. In puppeteer, there was a plugin puppeteer-extra-stealth which was able to hide headless chrome and websites did not detect headless mode. Is there a similar thing for playwright?
There is a playwright-extra in development however according to the creator this won't include the stealth evasions.
See: https://github.com/berstend/puppeteer-extra/pull/303 for more information.
That being said, you don't really need an external package in order to implement functionality that the puppeteer-extra-stealth package offers. Here is my attempt: https://gist.github.com/nicoandmee/1ec1b6a07c94f82df41d2496194ef3a6
In addition to doing everything the puppeteer package is doing, my code is generating a unique browser fingerprint based on real data collected from google analytics. This fingerprint is then used as part of the "evasions." It should be sufficient for most use-cases.
In playwright you can start the browser in a headful mode:
const browser = await playwright.firefox.launch(headless=false)
More about browser launch params: https://playwright.dev/docs/api/class-browsertype#browser-type-launch