Xewdy444/Playwright-reCAPTCHA ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library that helps Playwright scripts get past reCAPTCHA v2 and v3 during testing.
I want to be able to open a page in Playwright, create a solver around the page, and get back the g recaptcha response token so I can submit forms normally. For v2, it should try the audio challenge by transcribing the audio, and if I give it a CapSolver API key, it should also be able to handle the image challenge. For v3, it should watch for the browser request and capture the token from the response.
Please include both sync and async friendly usage, a few simple examples, and make sure it works cleanly with Firefox. Also add clear setup notes for ffmpeg since that seems required for audio. If anything is unclear, look up the current Playwright and reCAPTCHA docs online and keep the implementation practical and easy to use.