Skip to main content

Solve Google reCAPTCHA via audio challenge. Works with Playwright, CloakBrowser, and Selenium.

Project description

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 (requires ffmpeg: 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recaptcha_bypass_rizkyrauf-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recaptcha_bypass_rizkyrauf-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file recaptcha_bypass_rizkyrauf-0.1.0.tar.gz.

File metadata

File hashes

Hashes for recaptcha_bypass_rizkyrauf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ceadbfa75906f14502f2908cbb73a9eeb04f49b89cbe9d0ebffc0ec042b48a3b
MD5 6ddf4146e58f6f99ae61ebd42ccef62e
BLAKE2b-256 b7a8a7528c884643b39ebf9abe12ee3b77b170ac42ea6e8a74f5790b3928ef02

See more details on using hashes here.

File details

Details for the file recaptcha_bypass_rizkyrauf-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for recaptcha_bypass_rizkyrauf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e98d0c468ea1e7b303fd0767efc93cdbdbd4e67a171fd48c3f07d6bcec5a081a
MD5 615d94732f5744c7604cc7e1f501af95
BLAKE2b-256 a7d9266d2a8bbef5c8881f10cc8ac458d75f082b6c7e59ecd267cf01a4d7704a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page