CAPTCHA: detection and solving
CAPTCHAs happen. No matter how good your IP and browser fingerprint, there is no browsing without CAPTCHAs these days. Even on home computers with crystal clear IPs.
Rebrowser supports a number of different antibot systems and transparently checks your active pages for any CAPTCHAs presented in the background.
Once a CAPTCHA is detected, we will send a CDP event Rebrowser.captchaDetected
with some payload containing the captcha ID and vendor type.
If you have autosolving captchas enabled in browser settings and your plan supports it, it will automatically try to solve it using our AI algorithms. Usually it happens within a few seconds, but sometimes it could take up to 20-30 seconds. Be patient.
Once the CAPTCHA is solved, Rebrowser will emit event Rebrowser.captchaSolved
with the final status of solving.
If you experience any issues with solving CAPTCHA, don't hesitate to contact our team.
You can always ask us to support some custom CAPTCHA, we're fully open to help.
How to listen for CDP events?
It's very easy to listen for a custom CDP event from Rebrowser. Take a look below at example code for Puppeteer and Playwright libraries.
1 2 3 4 5 6 7 8
// puppeteer page._client().on('Rebrowser.captchaDetected', (params) => console.log('[captchaDetected]', params)) page._client().on('Rebrowser.captchaSolved', (params) => console.log('[captchaSolved]', params)) // playwright const cdp = await page.context().newCDPSession(page) cdp.on('Rebrowser.captchaDetected', (params) => console.log('[captchaDetected]', params)) cdp.on('Rebrowser.captchaSolved', (params) => console.log('[captchaSolved]', params))
You can also wait for these events after the page is loaded:
1 2 3 4 5 6
// puppeteer await new Promise((resolve) => page._client().on('Rebrowser.captchaDetected', resolve)) // playwright const cdp = await page.context().newCDPSession(page) await new Promise((resolve) => cdp.on('Rebrowser.captchaDetected', resolve))
Cloudflare
Cloudflare CAPTCHA is getting more and more popular as it comes as a default, free, and convenient option when a website is served by Cloudflare.
It's quite picky and rendered in a sophisticated way using multiple closed shadowRoot elements.
✅ But Rebrowser is fully capable of solving it automatically; you don't need to add anything extra.
reCAPTCHA
This is one of the oldest and most popular CAPTCHA systems. It's developed by Google and used on many websites in different forms.
reCAPTCHA could be used as part of the form or it could be invisible, meaning that you will see it only when you do some action (for example, submitting a form) and your reCAPTCHA score is quite low.
✅ reCAPTCHA is fully supported by Rebrowser for detection and automatic solving.
hCaptcha
It's quite similar to reCaptcha, using almost the same API as their initial goal was to make it as easy as possible to migrate from reCaptcha to hCaptcha.
✅ hCaptcha is fully supported by Rebrowser for detection and automatic solving.
☝️ When reCaptcha is presented in a form, and you've got the Rebrowser.captchaSolved event, you might not see a checkmark inside the reCaptcha checkbox; it's totally fine and expected behavior. The reCaptcha solution should already be inserted in the form, so you can proceed and submit the form.
DataDome
DataDome is really sensitive to many things that your scripts could do. If you see their interstitial captcha window, first of all, try to start your new Rebrowser session without any of your scripts involved.
No page.evaluate()
or anything else. Just try to open your target website with the Rebrowser and see how it goes.
If you have a decent proxy with a non-flagged IP, most likely you won't see any DataDome CAPTCHA at all. If this is the case, then captcha is triggered by some of your scripts.
✅ Rebrowser is capable of solving DataDome interstitial captcha automatically; after it's solved, the page will automatically refresh. If you see an error message saying that you're blocked, then most likely it's your IP or your scripts. In this case, it's usually impossible to pass this captcha even manually.
You can do another test - try to manually pass the captcha (using our live view mode right from your dashboard). If you're still blocked after this, then automatic captcha resolver won't help either. You need to focus on your scripts; there is something that triggers it.
We highly suggest reading our blog posts about isolated and main contexts, and try to move your code as much as you can into isolated context minimizing chances to be detected. Also, make sure to pass all the tests on our bot detector page.
Also, there could be some really surprising side effects. For example, DataDome will be triggered with this simple code:
1
page.evaluate(() => document.querySelector('recaptcha'))
Yes, it's really that deep. But if you run the same code in an isolated context, it won't be able to catch it.
Imperva (Incapsula)
Imperva (also known as Incapsula) is an intersitial page that shows hCaptcha.
✅ Rebrowser recognizes and automatically solve this puzzle for you.
Settings
Sometimes you might want to just detect CAPTCHA but don't solve it automatically. Or maybe you would like to disable detection as well.
You can easily achieve this by going into browser settings of a profile or a group and changing an option called "CAPTCHA behavior". The settings will be applied starting with the next run.