Open zhahaoyu opened 1 year ago
This is the code I use
import StealthPlugin from 'puppeteer-extra-plugin-stealth'
import {chromium} from 'playwright-extra'
import {chromium as chromiumRegular} from 'playwright'
chromium.use(StealthPlugin())
export const launchPlaywrightBrowser = async () => {
const browser = await chromium.launchServer({
headless: false
})
const b2 = await chromiumRegular.connect(browser.wsEndpoint())
const page = await b2.newPage()
await page.goto("https://bot.sannysoft.com")
}
launchPlaywrightBrowser()
Feature request
I am trying to drive playwright in Java. Unfortunately, the nice extra plugins are not supported in Java, so I tried to start a playwright browser server with
chromium.launchServer
using the patched chromium in javascript and use another playwright instance in Java to connect to it through wsEndpoint.I would love to have extra plugins, specifically the stealth plugin, work in this case.