Package: playwright-recaptcha
At the lowest price on the market, you may receive a variety of solutions, including reCAPTCHA v2, reCAPTCHA v3, hCaptcha, hCaptcha Click, FunCaptcha, picture-to-text, AWS Amazon CAPTCHA, and more. With this service, 0.1s is the slowest speed ever measured.Playwright-reCAPTCHAA Python library for solving reCAPTCHA v2 and v3 with Playwright.Solving reCAPTCHA v2reCAPTCHA v2 is solved by using the following methods:Solving the audio challenge by transcribing the audio using the Google speech recognition API and entering the text as the response.Solving the image challenge using theCapSolverAPI for image classification.Solving reCAPTCHA v3The solving of reCAPTCHA v3 is done by the browser itself, so this library simply waits for the browser to make a POST request tohttps://www.google.com/recaptcha/api2/reloadorhttps://www.google.com/recaptcha/enterprise/reloadand parses the response to get theg-recaptcha-responsetoken.All solvers return theg-recaptcha-responsetoken, which is required for form submissions. If you are unsure about the version of reCAPTCHA being used, you can check outthis blog postfor more information.Installationpip install playwright-recaptchaThis library requires FFmpeg to be installed on your system in order to convert the audio challenge from reCAPTCHA v2 into text.OSCommandDebianapt-get install ffmpegMacOSbrew install ffmpegWindowswinget install ffmpegYou can also download the latest static build fromhere.NoteMake sure to have the ffmpeg and ffprobe binaries in your system's PATH so that the SpeechRecognition library can find them.reCAPTCHA v2 ExampleFor more reCAPTCHA v2 examples, see theexamples folder.fromplaywright.sync_apiimportsync_playwrightfromplaywright_recaptchaimportrecaptchav2withsync_playwright()asplaywright:browser=playwright.firefox.launch()page=browser.new_page()page.goto("https://www.google.com/recaptcha/api2/demo")withrecaptchav2.SyncSolver(page)assolver:token=solver.solve_recaptcha(wait=True)print(token)If you would like to solve the image challenge, you can set theCAPSOLVER_API_KEYenvironment variable to yourCapSolverAPI key. You can also pass the API key as an argument torecaptchav2.SyncSolver()withcapsolver_api_key="your_api_key". Then, setimage_challenge=Trueinsolver.solve_recaptcha().withrecaptchav2.SyncSolver(page,capsolver_api_key="your_api_key")assolver:token=solver.solve_recaptcha(wait=True,image_challenge=True)print(token)reCAPTCHA v3 ExampleFor more reCAPTCHA v3 examples, see theexamples folder.fromplaywright.sync_apiimportsync_playwrightfromplaywright_recaptchaimportrecaptchav3withsync_playwright()asplaywright:browser=playwright.firefox.launch()page=browser.new_page()withrecaptchav3.SyncSolver(page)assolver:page.goto("https://antcpt.com/score_detector/")token=solver.solve_recaptcha()print(token)It is best to initialize the solver before navigating to the page with the reCAPTCHA v3 challenge. This is because the solver adds a listener for the POST request tohttps://www.google.com/recaptcha/api2/reloadorhttps://www.google.com/recaptcha/enterprise/reloadand if the request is made before the listener is added, theg-recaptcha-responsetoken will not be captured.DisclaimerThis library is intended for use in automated testing and development environments only and should not be used for any illegal or malicious purposes. Any use of this library for activities that violate the terms of service of any website or service is strictly prohibited. The contributors of this library will not be held liable for any damages or legal issues that may arise from the use of this library. By using this library, you agree to these terms and take full responsibility for your actions.