Skip to main content

capguru

Automatic captcha solving for Playwright via the Cap.Guru service.

Supported: reCAPTCHA v2, hCaptcha, GeeTest v3/v4, FunCaptcha (Arkose Labs), TikTok, AWS WAF, Yandex SmartCaptcha.

Installation

pip install capguru
playwright install chromium

Usage

import asyncio
from playwright.async_api import async_playwright
from captcha_solver import CaptchaSolver, CapGuruFatalError


async def main():
    async with async_playwright() as p:
        browser = await p.chromium.launch(headless=False)
        page = await browser.new_page()

        solver = CaptchaSolver(page=page, api_key='YOUR_KEY', debug=True)
        await solver.setup()

        await page.goto('https://site.com/cap')

        try:
            kind = await solver.auto(timeout=30)
            print('Captcha:', kind or 'not found')
        except CapGuruFatalError as e:
            print('API key or balance problem:', e)

        await browser.close()

asyncio.run(main())

Create the solver before page.goto() and call await solver.setup().

Methods

await solver.auto(timeout=30)
await solver.detect()
await solver.solve_recaptcha2()
await solver.solve_hcaptcha()
await solver.solve_other()
await solver.solve_geetest()
await solver.solve_funcaptcha()
await solver.solve_tiktok()
await solver.solve_aws()

Full documentation: https://docs.cap.guru

Metadata

Release files for capguru 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capguru 0.4.0
File Size Uploaded
capguru-0.4.0.tar.gz 38.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for capguru 0.4.0
File Interpreter ABI Platform
capguru-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 84.9 kB

Release files / capguru-0.4.0.tar.gz

Download URL capguru-0.4.0.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2ed2b3a5081708996220bae3f5ed322950720e5744c02df14fc726d9ae227712
BLAKE2b-256 checksum
How to use checksums
f7029084982c49d7bde3cb181cbba9da8ed8dbdbe051795347fbe28c9610f3a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / capguru-0.4.0-py3-none-any.whl

Download URL capguru-0.4.0-py3-none-any.whl
Size 46.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b19a7ce99e356c707754f307e9d9c0610f5d6068f318f0008f90f8837ccdff6d
BLAKE2b-256 checksum
How to use checksums
b186ffdda33d52d5446e30aa2adcb2c3822af9b71693f9718b5695a722393007
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page