- Notifications
You must be signed in to change notification settings - Fork965
Can this be used with Playwright?#856
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
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 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? Ithink 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: constbrowser=awaitplaywright.chromium.connectOverCDP('http://path-to-the-devtools-server:PORT');constdefaultContext=browser.contexts()[0];constpage=defaultContext.pages()[0]; |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments 3 replies
-
You need to change the Playwright user-agent to match the Flaresolverr user-agent. If its not possible you can use Python. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks for that! Seems that |
BetaWas this translation helpful?Give feedback.
All reactions
-
Were you able to find out the 'path-to-the-devtools-server' to do the cdp connection? |
BetaWas this translation helpful?Give feedback.