recaptcha-bypass
Solve Google reCAPTCHA via audio challenge in less than 10 seconds. 🚀
Works with Playwright, CloakBrowser, and Selenium drivers.
How It Works
Instead of solving the image captcha, this library switches to the audio challenge, downloads the audio file, converts it to WAV, and uses Google Speech Recognition to transcribe the numbers/words. The transcribed text is then entered into the response field.
Installation
pip install recaptcha-bypass
Or install from source:
git clone https://github.com/yourname/recaptcha-bypass.git
cd recaptcha-bypass
pip install -e .
Dependencies:
pydub- audio conversion (requiresffmpeg:sudo apt install ffmpeg)SpeechRecognition- speech-to-text
Quick Start
With CloakBrowser
from cloakbrowser import launch
from recaptcha_bypass import RecaptchaSolver
browser = launch(headless=True, humanize=True)
page = browser.new_page()
page.goto("https://protected-site.com")
solver = RecaptchaSolver(page)
solver.solve_captcha()
# Page is now accessible
print(page.title())
browser.close()
With Playwright
from playwright.sync_api import sync_playwright
from recaptcha_bypass import RecaptchaSolver
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
page.goto("https://protected-site.com")
solver = RecaptchaSolver(page)
solver.solve_captcha()
print(page.title())
browser.close()
With Selenium
from selenium import webdriver
from recaptcha_bypass import RecaptchaSolver
driver = webdriver.Chrome()
driver.get("https://www.google.com/recaptcha/api2/demo")
solver = RecaptchaSolver(driver)
solver.solve_captcha()
print(driver.title)
driver.quit()
With SeleniumBase
from seleniumbase import SB
from recaptcha_bypass import RecaptchaSolver
with SB(uc=True, headless=True) as sb:
sb.open("https://protected-site.com")
sb.sleep(5)
solver = RecaptchaSolver(sb.driver)
solver.solve_captcha()
print(sb.get_title())
API
RecaptchaSolver(driver, *, headless=True)
| Parameter | Type | Default | Description |
|---|---|---|---|
driver |
Playwright Page / Selenium WebDriver | required | Browser automation driver |
headless |
bool | True |
Whether browser runs headless |
Methods
| Method | Returns | Description |
|---|---|---|
solve_captcha(max_retries=5) |
bool |
Solve reCAPTCHA on current page |
is_solved() |
bool |
Check if reCAPTCHA is solved |
is_detected() |
bool |
Check if bot was detected |
get_token() |
str | None |
Get reCAPTCHA response token |
Advanced Usage
Retry with custom attempts
solver = RecaptchaSolver(page)
success = solver.solve_captcha(max_retries=10)
if not success:
print("Failed to solve CAPTCHA")
Check if CAPTCHA exists before solving
solver = RecaptchaSolver(page)
if solver._has_recaptcha():
print("CAPTCHA detected, solving...")
solver.solve_captcha()
else:
print("No CAPTCHA found")
Get reCAPTCHA token for API calls
solver = RecaptchaSolver(page)
solver.solve_captcha()
token = solver.get_token()
if token:
# Use token in your API request
print(f"reCAPTCHA token: {token[:50]}...")
Combined with CloakBrowser stealth
from cloakbrowser import launch
from recaptcha_bypass import RecaptchaSolver
# CloakBrowser prevents CAPTCHA from appearing (~80% cases)
browser = launch(headless=True, humanize=True)
page = browser.new_page()
page.goto("https://protected-site.com")
# Fallback: solve CAPTCHA if it still appears
solver = RecaptchaSolver(page)
if solver._has_recaptcha():
solver.solve_captcha()
# Now scrape
content = page.inner_text("body")
browser.close()
Supported Sites
| Site | CAPTCHA Type | Success Rate |
|---|---|---|
| radaronline.id | reCAPTCHA v2 | ✅ High |
| GitLab login | reCAPTCHA v2 | ✅ High |
| Ahrefs | reCAPTCHA v2 | ✅ High |
| Any reCAPTCHA v2 site | reCAPTCHA v2 | ✅ High |
Limitations
- reCAPTCHA v2 only - does not support reCAPTCHA v3, Enterprise, or hCaptcha
- Rate limiting - Google may block your IP if you solve too many CAPTCHAs quickly. Use proxies or add delays between solves
- Audio recognition - depends on Google Speech API accuracy. May fail on noisy audio
- Not for production scale - for large-scale scraping, consider paid CAPTCHA solving services (CapSolver, 2Captcha)
Architecture
┌─────────────────────────────────────────────────┐
│ recaptcha-bypass │
├─────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Playwright │ │ Selenium │ │
│ │ (CloakBrowser)│ │ (WebDriver) │ │
│ └──────┬───────┘ └──────────┬───────────┘ │
│ │ │ │
│ └───────────┬───────────┘ │
│ │ │
│ ┌───────────▼───────────┐ │
│ │ RecaptchaSolver │ │
│ │ │ │
│ │ 1. Click checkbox │ │
│ │ 2. Switch to audio │ │
│ │ 3. Download MP3 │ │
│ │ 4. Convert to WAV │ │
│ │ 5. Speech → Text │ │
│ │ 6. Submit answer │ │
│ │ 7. Retry if needed │ │
│ └────────────────────────┘ │
│ │ │
│ ┌───────────▼───────────┐ │
│ │ pydub + │ │
│ │ SpeechRecognition │ │
│ └───────────────────────┘ │
└─────────────────────────────────────────────────┘
License
MIT
Metadata
Release files for recaptcha-bypass-RizkyRauf 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| recaptcha_bypass_rizkyrauf-0.1.0.tar.gz | 8.2 kB | Without provenance | Details for recaptcha_bypass_rizkyrauf-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| recaptcha_bypass_rizkyrauf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for recaptcha_bypass_rizkyrauf-0.1.0-py3-none-any.whl |
Total release size: 14.8 kB
Release files / recaptcha_bypass_rizkyrauf-0.1.0.tar.gz
| Download URL | recaptcha_bypass_rizkyrauf-0.1.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ceadbfa75906f14502f2908cbb73a9eeb04f49b89cbe9d0ebffc0ec042b48a3b
|
|
BLAKE2b-256 checksum How to use checksums |
b7a8a7528c884643b39ebf9abe12ee3b77b170ac42ea6e8a74f5790b3928ef02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / recaptcha_bypass_rizkyrauf-0.1.0-py3-none-any.whl
| Download URL | recaptcha_bypass_rizkyrauf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e98d0c468ea1e7b303fd0767efc93cdbdbd4e67a171fd48c3f07d6bcec5a081a
|
|
BLAKE2b-256 checksum How to use checksums |
a7d9266d2a8bbef5c8881f10cc8ac458d75f082b6c7e59ecd267cf01a4d7704a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for recaptcha-bypass-RizkyRauf 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.