rcap
reCAPTCHA v2 Image Solver using YOLO with Selenium and Playwright
https://github.com/user-attachments/assets/22308be7-3a90-4757-8799-b47008b32bf0
How it works
- Uses Selenium or Playwright from rcap-client for browser interaction.
- Uses YOLO-based models from rcap-core for image detection.
Installation
Install via pip:
pip install rcap
Usage
Selenium example:
from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from webdriver_manager.firefox import GeckoDriverManager
from rcap.solver import SeleniumRecaptchaSolver
driver = webdriver.Firefox(service=Service(GeckoDriverManager().install()))
driver.get("https://www.google.com/recaptcha/api2/demo")
solver = SeleniumRecaptchaSolver(driver)
solver.solve() # Done!
print("reCAPTCHA solved!")
input("Press Enter to quit...")
driver.quit()
Playwright example:
from playwright.sync_api import sync_playwright
from rcap.solver import PlaywrightRecaptchaSolver
playwright = sync_playwright().start()
browser = playwright.chromium.launch(headless=False)
page = browser.new_page()
page.goto("https://www.google.com/recaptcha/api2/demo")
solver = PlaywrightRecaptchaSolver(page)
solver.solve() # Done!
print("reCAPTCHA solved!")
input("Press Enter to quit...")
page.close()
Recommendation: Use Camoufox for stealthier automation
For better stealth and human-like interactions, I recommend using Camoufox — an anti-detect browser that simulates human cursor movement and other behaviors to help avoid bot detection.
https://github.com/user-attachments/assets/85dfcbbd-316d-4841-b20b-df5d0efea863
Install
pip install -U camoufox
# optional but recommended if using proxies:
# pip install -U "camoufox[geoip]"
Download the Camoufox browser:
python -m camoufox fetch
Usage with rcap
from rcap.solver import PlaywrightRecaptchaSolver
from camoufox.sync_api import Camoufox
camoufox = Camoufox(headless=False, humanize=True)
browser = camoufox.start()
page = browser.new_page()
page.goto("https://www.google.com/recaptcha/api2/demo")
solver = PlaywrightRecaptchaSolver(page)
solver.solve() # Done!
print("reCAPTCHA solved!")
input("Press Enter to quit...")
page.close()
humanize=True enables Camoufox's human-like cursor movement, which can significantly reduce the chance of triggering reCAPTCHA in the first place.
Metadata
Release files for rcap 3.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rcap-3.0.2.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rcap-3.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / rcap-3.0.2.tar.gz
| Download URL | rcap-3.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7875405eff493a794ac799d0ca1076573507e0033d47edeceac1110d578ce413
|
|
BLAKE2b-256 checksum How to use checksums |
8491cb94dfab1408a9b8b2614e8fb63b5b6883b97a6fe41f3a18050c9032af62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / rcap-3.0.2-py3-none-any.whl
| Download URL | rcap-3.0.2-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd37d7c0ae13089f08285fb70638503db369af5352c2feef5d06e6dad8172e4e
|
|
BLAKE2b-256 checksum How to use checksums |
f30920fec0abaab1bd3e7f542824289940b5bd051dd759a3f5c567b46332efbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|