Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Is it possible to use FlareSolverr with Playwright?

I'm using the REST API get the cookies for a specific website and plugging them, along with the user agent into Playwright via the context.addCookies() method however, it looks like I'm still getting the Cloudflare Waiting Room for https://digital.pnbank.com.au/ when trying to open that page. Both requests (FlareSolverr and Playwright) are coming from the same IP.

Is this even possible to use this way? If so, does someone have any idea what I'm doing wrong?

Could this project be changed to include the developer tools URL or similar of a session? I think that could be used with Playwright or Puppeteer to remote control the browser that just solved the captcha?

If we could get the CDP URL from webdriver we could then connect in Playwright via:

const browser = await playwright.chromium.connectOverCDP('http://path-to-the-devtools-server:PORT');
const defaultContext = browser.contexts()[0];
const page = defaultContext.pages()[0];
You must be logged in to vote

Replies: 2 comments · 3 replies

Comment options

You need to change the Playwright user-agent to match the Flaresolverr user-agent. If its not possible you can use Python.

You must be logged in to vote
3 replies
@waynerobinson
Comment options

As mentioned, I used the same user agent, but to no avail. I suspect that they’re doing TLS fingerprinting or similar.

Which is why it would be nice to just be able to connect to the Chrom(e/ium) session that’s created by FlareSolverr.

@ngosang
Comment options

They do TLS fingerprinting during the challenge, but when you have the cookie they only chech the user-agent. You should open a CheckMyUserAgent with Playwrigt to make sure you are changing the user agent.

An alternative could be using just FlareSolverr to make all requests. Check about sessions in the readme.

@waynerobinson
Comment options

Thanks for that! Seems that puppeteer-extra-plugin-stealth was overriding the set user agent.

Comment options

Were you able to find out the 'path-to-the-devtools-server' to do the cdp connection?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.