Skip to content

Commit 684c702

Browse files
committed
Create AGENTS.md
1 parent 4743d36 commit 684c702

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

src/python3_capsolver/AGENTS.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# PYTHON3_CAPSOLVER PACKAGE
2+
3+
**Generated:** 2026-01-13
4+
5+
## OVERVIEW
6+
Main library package containing service-specific captcha solving implementations. Provides high-level interfaces for various captcha types (ReCaptcha, Cloudflare Turnstile, DataDome, etc.) through a unified API.
7+
8+
Each service class inherits from `core.CaptchaParams` and implements synchronous (`requests`) and asynchronous (`aiohttp`) solving methods with automatic retry logic and response polling.
9+
10+
## STRUCTURE
11+
```
12+
src/python3_capsolver/
13+
├── core/ # Base classes, instruments, serializers
14+
├── control.py # Control class for direct API methods
15+
├── recaptcha.py # ReCaptcha V2/V3/Enterprise implementations
16+
├── cloudflare.py # Cloudflare Turnstile/Challenge solver
17+
├── vision_engine.py # AI-based image recognition
18+
├── image_to_text.py # OCR text extraction
19+
├── datadome_slider.py # DataDome slider captcha
20+
├── mt_captcha.py # MtCaptcha solver
21+
├── gee_test.py # GeeTest solver
22+
├── aws_waf.py # AWS WAF bypass
23+
├── friendly_captcha.py # FriendlyCaptcha solver
24+
└── yandex.py # Yandex captcha solver
25+
```
26+
27+
## WHERE TO LOOK
28+
| Task | Location | Notes |
29+
|------|----------|-------|
30+
| **Direct API Access** | `control.py` | `Control.get_balance()`, `create_task()`, `get_task_result()` |
31+
| **ReCaptcha** | `recaptcha.py` | V2, V3, Enterprise variants |
32+
| **Cloudflare** | `cloudflare.py` | Turnstile, Challenge modes |
33+
| **Image-based** | `vision_engine.py`, `image_to_text.py` | AI recognition, OCR |
34+
| **Other Services** | `*.py` | DataDome, GeeTest, AWS WAF, etc. |
35+
| **Base Logic** | `core/` | `CaptchaParams`, instruments, serializers |
36+
37+
## CONVENTIONS
38+
- **Service Pattern**: Each service class inherits from `CaptchaParams` with `api_key` and `captcha_type` params
39+
- **Dual Handlers**: All services provide `captcha_handler()` (sync) and `aio_captcha_handler()` (async)
40+
- **Retry Logic**: Built-in exponential backoff with configurable `sleep_time` (default: 5s)
41+
- **Task Payload**: Passed via `task_payload` dict, merged with internal task params
42+
- **Response Structure**: Returns dict with `errorId`, `taskId`, `status`, `solution` fields
43+
- **Context Managers**: Support `with` and `async with` for session cleanup

0 commit comments

Comments
 (0)