Content-Length: 335410 | pFad | http://github.com/alperensert/capmonster_python

35 GitHub - alperensert/capmonster_python: Capmonster.cloud library for Python3
Skip to content

alperensert/capmonster_python

Repository files navigation

πŸ€– Capmonster Python

PyPI - Python Version GitHub code size in bytes GitHub last commit GitHub Release GitHub Repo stars

A modern, strongly typed, async-friendly Python SDK for solving CAPTCHA challenges using Capmonster.Cloud.

Supports reCAPTCHA v2 & v3, Cloudflare Turnstile, GeeTest (v3 & v4) and much more.


✨ Features

  • βœ… Fully typed Pydantic v2 models
  • πŸ” Both sync and async API support
  • πŸ” Proxy and User-Agent configuration
  • πŸ“¦ Supports the most common CAPTCHA types
  • πŸ“š Intuitive API with powerful task building

πŸ”§ Installation

pip install capmonster_python

Important

You're viewing the documentation for Capmonster Python v4, which includes breaking changes. If you prefer the old syntax used in versions prior to 4.x, you can continue using it by installing the legacy version:
pip install capmonster_python==3.2

πŸš€ Quick Start

Async Example

import asyncio
from capmonster_python import CapmonsterClient, RecaptchaV3Task


async def main():
    client = CapmonsterClient(api_key="YOUR_API_KEY")

    task = RecaptchaV3Task(
        websiteURL="https://example.com",
        websiteKey="SITE_KEY_HERE",
        minScore=0.5,
        pageAction="verify"
    )

    task_id = await client.create_task_async(task)
    result = await client.join_task_result_async(task_id)
    print(result)


asyncio.run(main())

Sync Example

from capmonster_python import CapmonsterClient, RecaptchaV2Task

client = CapmonsterClient(api_key="<YOUR_API_KEY>")

task = RecaptchaV2Task(
    websiteURL="https://example.com",
    websiteKey="SITE_KEY_HERE"
)

task_id = client.create_task(task)
result = client.join_task_result(task_id)
print(result)

🧠 Supported CAPTCHA Types

Capmonster Python v4 supports a wide range of CAPTCHA formats β€” from mainstream challenges like reCAPTCHA and Turnstile to enterprise-grade shields like Imperva and DataDome. Each task supports full Pydantic validation βœ… and both sync and async clients πŸ”„ unless noted.

πŸ”– Category CAPTCHA Type Class Name Proxy Required Notes
🧩 reCAPTCHA reCAPTCHA v2 RecaptchaV2Task Optional Visible / Invisible supported βœ… πŸ”„
reCAPTCHA v2 Enterprise RecaptchaV2EnterpriseTask Optional enterprisePayload & apiDomain βœ… πŸ”„
reCAPTCHA v3 RecaptchaV3Task ❌ No Score-based, proxyless βœ… πŸ”„
πŸ›‘οΈ Cloudflare Turnstile (token) TurnstileTask ❌ No Lightweight, async-ready βœ… πŸ”„
Turnstile (cf_clearance) TurnstileCloudFlareTask βœ… Yes Full HTML + proxy required βœ… πŸ”„
πŸ“Έ Image-based Image-to-Text OCR ImageToTextTask ❌ No Base64 image + module control βœ… πŸ”„
Complex Image (Recaptcha-like) ComplexImageRecaptchaTask ❌ No Grid-based, metadata aware βœ… πŸ”„
Complex Image Recognition (AI) ComplexImageRecognitionTask ❌ No Supports tasks like Shein, OOCL βœ… πŸ”„
🧠 Human Behavior GeeTest v3 GeeTestV3Task Optional Challenge + gt key + freshness βœ… πŸ”„
GeeTest v4 GeeTestV4Task Optional initParameters supported βœ… πŸ”„
πŸ›‘οΈ Enterprise Protection DataDome DataDomeTask βœ… Recommended Cookie & page context needed βœ… πŸ”„
Imperva ImpervaTask βœ… Recommended Incapsula + Reese84 logic βœ… πŸ”„
🏦 Platform-Specific Binance Login BinanceTask βœ… Yes validateId for login flow βœ… πŸ”„
Temu TemuTask ❌ No Cookie-injected behavioral solver βœ… πŸ”„
TenDI TenDITask βœ… Yes Custom captchaAppId field βœ… πŸ”„
πŸ§ͺ Miscellaneous Prosopo ProsopoTask Optional Used in zk or crypto UIs βœ… πŸ”„
Basilisk BasiliskTask ❌ No Minimalist site-key puzzle βœ… πŸ”„

🧩 Advanced Usage

  • Callback URLs are supported during task creation.
  • Includes auto-retry loop for polling results (up to 120s)

πŸ’¬ Community & Support

Need help or have a question?

Note

Community support is intended only for questions and issues related to this project. Custom usage scenarios, integrations, or application-specific logic are outside the scope of support.

πŸ“„ License

This project is licensed under the MIT License.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/alperensert/capmonster_python

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy