Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Capmonster.cloud library for Python3

License

NotificationsYou must be signed in to change notification settings

alperensert/capmonster_python

Repository files navigation

PyPI - Python VersionGitHub code size in bytesGitHub last commitGitHub ReleaseGitHub Repo stars

A modern, strongly typed, async-friendly Python SDK for solving CAPTCHA challengesusingCapmonster.Cloud.

Supports reCAPTCHA v2 & v3, Cloudflare Turnstile, GeeTest (v3 & v4) andmuch 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 forCapmonster Python v4, which includes breaking changes. If you prefer theold 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

importasynciofromcapmonster_pythonimportCapmonsterClient,RecaptchaV3Taskasyncdefmain():client=CapmonsterClient(api_key="YOUR_API_KEY")task=RecaptchaV3Task(websiteURL="https://example.com",websiteKey="SITE_KEY_HERE",minScore=0.5,pageAction="verify"    )task_id=awaitclient.create_task_async(task)result=awaitclient.join_task_result_async(task_id)print(result)asyncio.run(main())

Sync Example

fromcapmonster_pythonimportCapmonsterClient,RecaptchaV2Taskclient=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 Turnstileto enterprise-grade shields like Imperva and DataDome. Each task supports full Pydantic validation ✅ and both sync andasync clients 🔄 unless noted.

🔖 CategoryCAPTCHA TypeClass NameProxy RequiredNotes
🧩 reCAPTCHAreCAPTCHA v2RecaptchaV2TaskOptionalVisible / Invisible supported ✅ 🔄
reCAPTCHA v2 EnterpriseRecaptchaV2EnterpriseTaskOptionalenterprisePayload &apiDomain ✅ 🔄
reCAPTCHA v3RecaptchaV3Task❌ NoScore-based, proxyless ✅ 🔄
🛡️ CloudflareTurnstile (token)TurnstileTask❌ NoLightweight, async-ready ✅ 🔄
Turnstile (cf_clearance)TurnstileCloudFlareTask✅ YesFull HTML + proxy required ✅ 🔄
📸 Image-basedImage-to-Text OCRImageToTextTask❌ NoBase64 image + module control ✅ 🔄
Complex Image (Recaptcha-like)ComplexImageRecaptchaTask❌ NoGrid-based, metadata aware ✅ 🔄
Complex Image Recognition (AI)ComplexImageRecognitionTask❌ NoSupports tasks like Shein, OOCL ✅ 🔄
🧠 Human BehaviorGeeTest v3GeeTestV3TaskOptionalChallenge +gt key + freshness ✅ 🔄
GeeTest v4GeeTestV4TaskOptionalinitParameters supported ✅ 🔄
🛡️ Enterprise ProtectionDataDomeDataDomeTask✅ RecommendedCookie & page context needed ✅ 🔄
ImpervaImpervaTask✅ RecommendedIncapsula + Reese84 logic ✅ 🔄
🏦 Platform-SpecificBinance LoginBinanceTask✅ YesvalidateId for login flow ✅ 🔄
TemuTemuTask❌ NoCookie-injected behavioral solver ✅ 🔄
TenDITenDITask✅ YesCustom captchaAppId field ✅ 🔄
🧪 MiscellaneousProsopoProsopoTaskOptionalUsed in zk or crypto UIs ✅ 🔄
BasiliskBasiliskTask❌ NoMinimalist 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 theMIT License.


[8]ページ先頭

©2009-2025 Movatter.jp