gatesolve-selenium
Automatic CAPTCHA solving for Selenium WebDriver. Detects Cloudflare Turnstile, reCAPTCHA, and hCaptcha and solves them via GateSolve.
Install
pip install gatesolve-selenium
Quick Start
One-shot: Solve CAPTCHA on current page
from selenium import webdriver
from gatesolve_selenium import solve_on_page
driver = webdriver.Chrome()
driver.get("https://example.com/login")
# Detect and solve any CAPTCHA
result = solve_on_page(driver, api_key="gs_your_key_here")
if result and result.success:
print(f"Solved {result.type} in {result.solve_time_ms:.0f}ms")
driver.find_element("css selector", 'button[type="submit"]').click()
Auto-solve: Patch driver
from selenium import webdriver
from gatesolve_selenium import with_gatesolve
driver = webdriver.Chrome()
driver = with_gatesolve(driver, api_key="gs_your_key_here", debug=True)
# CAPTCHAs are solved automatically after every driver.get()
driver.get("https://protected-site.com")
Detect only
from gatesolve_selenium import detect_captcha
detection = detect_captcha(driver)
if detection:
print(f"Found {detection.type} with siteKey {detection.site_key}")
API
solve_on_page(driver, api_key=None, opts=None, **kwargs)
Detect and solve a CAPTCHA on the current page. Returns SolveResult | None.
with_gatesolve(driver, api_key=None, opts=None, **kwargs)
Patch a WebDriver to auto-solve CAPTCHAs after every get() call. Returns the same driver.
detect_captcha(driver)
Detect CAPTCHA type and siteKey without solving. Returns CaptchaDetection | None.
Options
| Option | Type | Default | Description |
|---|---|---|---|
api_key |
str |
required | GateSolve API key |
base_url |
str |
https://gatesolve.dev |
API base URL |
timeout |
float |
30.0 |
Max solve wait (seconds) |
poll_interval |
float |
2.0 |
Poll frequency (seconds) |
debug |
bool |
False |
Log debug info |
Supported CAPTCHAs
- Cloudflare Turnstile — $0.02/solve
- reCAPTCHA v2/v3 — $0.03/solve
- hCaptcha — $0.03/solve
Free Tier
100 free solves per API key. No credit card required. gatesolve.dev
License
MIT
Release files for gatesolve-selenium 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 | |
|---|---|---|---|
| gatesolve_selenium-0.1.0.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gatesolve_selenium-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / gatesolve_selenium-0.1.0.tar.gz
| Download URL | gatesolve_selenium-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7eaa282feef785999561d0453c8b6385198210ef4379426b3cdf737c2d854f7
|
|
BLAKE2b-256 checksum How to use checksums |
9e6f8a0b27253a8cfc061896e4e7cc2e1109fee085a0b27635ebc63cc70e8ec2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / gatesolve_selenium-0.1.0-py3-none-any.whl
| Download URL | gatesolve_selenium-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
231836de0961511c98ce357e500e026f3d830c48402d56ab732ffb15262258d1
|
|
BLAKE2b-256 checksum How to use checksums |
8dfbb3791697cda7a0b8d59b7a050efae0a441b56127be5a803ffe3478ac1666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|