From cdfad794384f6d0d6c7922d9fb8505cac85ec97f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 07:22:10 +0000 Subject: [PATCH 01/17] [github-actions] Bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/build_sphinx.yml | 2 +- .github/workflows/install.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/sphinx.yml | 2 +- .github/workflows/test.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae6472c6..2e87f3b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/build_sphinx.yml b/.github/workflows/build_sphinx.yml index 1560222a..7649fab8 100644 --- a/.github/workflows/build_sphinx.yml +++ b/.github/workflows/build_sphinx.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python 3.11 uses: actions/setup-python@v5 with: diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 20574950..af12f046 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -23,7 +23,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5191e16e..432695eb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,7 +27,7 @@ jobs: python-version: ["3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index a7d41d19..5f3f1667 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python 3.11 uses: actions/setup-python@v5 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6dcd062..a5a3f461 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: python-version: ["3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: From 58a7a9300882522dc40d241e4e84263b3ab108d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 21:07:09 +0000 Subject: [PATCH 02/17] [github-actions] Bump actions/setup-python from 5 to 6 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/build_sphinx.yml | 2 +- .github/workflows/install.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/sphinx.yml | 2 +- .github/workflows/test.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e87f3b4..57130515 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/build_sphinx.yml b/.github/workflows/build_sphinx.yml index 7649fab8..ab9abd7f 100644 --- a/.github/workflows/build_sphinx.yml +++ b/.github/workflows/build_sphinx.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python 3.11 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.11.6 diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index af12f046..785b4d28 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 432695eb..2a7e3f9d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 5f3f1667..405de61c 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python 3.11 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.11.6 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5a3f461..779753cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} From f22e87e65a0c328589364bd3aa21834b4cf84b8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:04:32 +0000 Subject: [PATCH 03/17] Bump black from 25.1.0 to 25.9.0 Bumps [black](https://github.com/psf/black) from 25.1.0 to 25.9.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/25.1.0...25.9.0) --- updated-dependencies: - dependency-name: black dependency-version: 25.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.style.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.style.txt b/requirements.style.txt index 8fbb0b9b..ad634e98 100644 --- a/requirements.style.txt +++ b/requirements.style.txt @@ -1,4 +1,4 @@ # codestyle isort==6.* -black==25.1.0 +black==25.9.0 autoflake==2.* From 9179c900567497fbf8a26545fa6077c337616bd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 21:10:41 +0000 Subject: [PATCH 04/17] Bump black from 25.9.0 to 25.11.0 Bumps [black](https://github.com/psf/black) from 25.9.0 to 25.11.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/25.9.0...25.11.0) --- updated-dependencies: - dependency-name: black dependency-version: 25.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.style.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.style.txt b/requirements.style.txt index ad634e98..b4100bfa 100644 --- a/requirements.style.txt +++ b/requirements.style.txt @@ -1,4 +1,4 @@ # codestyle isort==6.* -black==25.9.0 +black==25.11.0 autoflake==2.* From b6b9cae40c2985b97a418dbf792401c1d6e420a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:07:43 +0000 Subject: [PATCH 05/17] [github-actions] Bump actions/checkout from 5 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/build_sphinx.yml | 2 +- .github/workflows/install.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/sphinx.yml | 2 +- .github/workflows/test.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57130515..ffed285b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: diff --git a/.github/workflows/build_sphinx.yml b/.github/workflows/build_sphinx.yml index ab9abd7f..b63659a7 100644 --- a/.github/workflows/build_sphinx.yml +++ b/.github/workflows/build_sphinx.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python 3.11 uses: actions/setup-python@v6 with: diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 785b4d28..f3bc2879 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -23,7 +23,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2a7e3f9d..5713e8bf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,7 +27,7 @@ jobs: python-version: ["3.12"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 405de61c..1ea5792c 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python 3.11 uses: actions/setup-python@v6 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 779753cb..1c2f71db 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: python-version: ["3.12"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: From 1fc2f7533068dd228777d057a9922ba0a27bb842 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 21:13:30 +0000 Subject: [PATCH 06/17] Update msgspec requirement from <0.20,>=0.18 to >=0.18,<0.21 Updates the requirements on [msgspec](https://github.com/jcrist/msgspec) to permit the latest version. - [Release notes](https://github.com/jcrist/msgspec/releases) - [Changelog](https://github.com/jcrist/msgspec/blob/main/docs/changelog.md) - [Commits](https://github.com/jcrist/msgspec/compare/0.18.0...0.20.0) --- updated-dependencies: - dependency-name: msgspec dependency-version: 0.20.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 51a6fb70..fe090114 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ classifiers = [ dependencies = [ "requests>=2.21.0", "aiohttp>=3.9.2", - "msgspec>=0.18,<0.20", + "msgspec>=0.18,<0.21", "tenacity>=8,<10" ] From 820b1e2e0d05710aa191380a850dde43cafc3cb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:03:21 +0000 Subject: [PATCH 07/17] Update isort requirement from ==6.* to ==7.* Updates the requirements on [isort](https://github.com/PyCQA/isort) to permit the latest version. - [Release notes](https://github.com/PyCQA/isort/releases) - [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md) - [Commits](https://github.com/PyCQA/isort/compare/6.0.0...7.0.0) --- updated-dependencies: - dependency-name: isort dependency-version: 7.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.style.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.style.txt b/requirements.style.txt index b4100bfa..15465e10 100644 --- a/requirements.style.txt +++ b/requirements.style.txt @@ -1,4 +1,4 @@ # codestyle -isort==6.* +isort==7.* black==25.11.0 autoflake==2.* From 24b6fb28885e2995b113c0720cc04d55a74a269b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:03:24 +0000 Subject: [PATCH 08/17] Bump black from 25.11.0 to 25.12.0 Bumps [black](https://github.com/psf/black) from 25.11.0 to 25.12.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/25.11.0...25.12.0) --- updated-dependencies: - dependency-name: black dependency-version: 25.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.style.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.style.txt b/requirements.style.txt index b4100bfa..86aa6d76 100644 --- a/requirements.style.txt +++ b/requirements.style.txt @@ -1,4 +1,4 @@ # codestyle isort==6.* -black==25.11.0 +black==25.12.0 autoflake==2.* From ef637fabbe4335110437c5c91c2296c2a5ad9d9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:03:30 +0000 Subject: [PATCH 09/17] Bump sphinx from 8.2.3 to 9.1.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.3 to 9.1.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.3...v9.1.0) --- updated-dependencies: - dependency-name: sphinx dependency-version: 9.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 5bb4d83c..dbddd285 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ -sphinx==8.2.3 +sphinx==9.1.0 pallets_sphinx_themes==2.3.0 myst-parser==4.0.1 From 235e22cfe40c36ad2d130be71b8e8257b3856ae9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:03:37 +0000 Subject: [PATCH 10/17] Update pytest requirement from ==8.* to ==9.* Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.0.0.dev0...9.0.2) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.test.txt b/requirements.test.txt index cc87b91b..e14e8600 100644 --- a/requirements.test.txt +++ b/requirements.test.txt @@ -1,3 +1,3 @@ -pytest==8.* +pytest==9.* coverage==7.* pytest-asyncio==1.* From d047956c4344d3c41fc8aa9744411ac91a1934a2 Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Jan 2026 00:01:56 +0300 Subject: [PATCH 11/17] Create AGENTS.md --- AGENTS.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..f7b51cee --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,41 @@ +# PROJECT KNOWLEDGE BASE + +**Generated:** 2026-01-13 + +## OVERVIEW +Python 3.8+ library for Capsolver service API. Supports both synchronous (`requests`) and asynchronous (`aiohttp`) operations. Uses `msgspec` for high-performance JSON serialization. + +## STRUCTURE +``` +./ +├── src/python3_capsolver/ # Main library package +│ ├── core/ # Base classes, serializers, instruments +│ └── *.py # Service-specific implementations (ReCaptcha, Cloudflare, etc.) +├── tests/ # Pytest suite +└── docs/ # Sphinx documentation +``` + +## WHERE TO LOOK +| Task | Location | Notes | +|------|----------|-------| +| **Base Logic** | `src/python3_capsolver/core/` | `base.py`, `serializer.py`, `enum.py` | +| **Service Implementations** | `src/python3_capsolver/*.py` | `recaptcha.py`, `cloudflare.py`, etc. | +| **Tests** | `tests/` | Matches source structure | +| **Configuration** | `pyproject.toml` | Build, dependency, tool config | + +## CONVENTIONS +- **Formatter**: `black` (line-length 120), `isort` (profile "black"). +- **Serialization**: `msgspec` preferred over `json` for performance. +- **Concurrency**: Dual support (Sync/Async) required for all instruments. +- **Retries**: `tenacity` library used for resilience. + +## COMMANDS +```bash +make tests # Run test suite +pip install . # Install package locally +``` + +## NOTES +- Dependencies: `requests`, `aiohttp`, `msgspec`, `tenacity`. +- Requires `API_KEY` in environment for tests. + From 4743d3683b325c17c2346265cd6ee094a04ef0ff Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Jan 2026 00:01:59 +0300 Subject: [PATCH 12/17] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fe090114..1e9a2195 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ classifiers = [ dependencies = [ "requests>=2.21.0", "aiohttp>=3.9.2", - "msgspec>=0.18,<0.21", + "msgspec>=0.18,<=0.21", "tenacity>=8,<10" ] From 684c702e155dca40f85b701d44c47672dae9f663 Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Jan 2026 00:02:07 +0300 Subject: [PATCH 13/17] Create AGENTS.md --- src/python3_capsolver/AGENTS.md | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/python3_capsolver/AGENTS.md diff --git a/src/python3_capsolver/AGENTS.md b/src/python3_capsolver/AGENTS.md new file mode 100644 index 00000000..95beba74 --- /dev/null +++ b/src/python3_capsolver/AGENTS.md @@ -0,0 +1,43 @@ +# PYTHON3_CAPSOLVER PACKAGE + +**Generated:** 2026-01-13 + +## OVERVIEW +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. + +Each service class inherits from `core.CaptchaParams` and implements synchronous (`requests`) and asynchronous (`aiohttp`) solving methods with automatic retry logic and response polling. + +## STRUCTURE +``` +src/python3_capsolver/ +├── core/ # Base classes, instruments, serializers +├── control.py # Control class for direct API methods +├── recaptcha.py # ReCaptcha V2/V3/Enterprise implementations +├── cloudflare.py # Cloudflare Turnstile/Challenge solver +├── vision_engine.py # AI-based image recognition +├── image_to_text.py # OCR text extraction +├── datadome_slider.py # DataDome slider captcha +├── mt_captcha.py # MtCaptcha solver +├── gee_test.py # GeeTest solver +├── aws_waf.py # AWS WAF bypass +├── friendly_captcha.py # FriendlyCaptcha solver +└── yandex.py # Yandex captcha solver +``` + +## WHERE TO LOOK +| Task | Location | Notes | +|------|----------|-------| +| **Direct API Access** | `control.py` | `Control.get_balance()`, `create_task()`, `get_task_result()` | +| **ReCaptcha** | `recaptcha.py` | V2, V3, Enterprise variants | +| **Cloudflare** | `cloudflare.py` | Turnstile, Challenge modes | +| **Image-based** | `vision_engine.py`, `image_to_text.py` | AI recognition, OCR | +| **Other Services** | `*.py` | DataDome, GeeTest, AWS WAF, etc. | +| **Base Logic** | `core/` | `CaptchaParams`, instruments, serializers | + +## CONVENTIONS +- **Service Pattern**: Each service class inherits from `CaptchaParams` with `api_key` and `captcha_type` params +- **Dual Handlers**: All services provide `captcha_handler()` (sync) and `aio_captcha_handler()` (async) +- **Retry Logic**: Built-in exponential backoff with configurable `sleep_time` (default: 5s) +- **Task Payload**: Passed via `task_payload` dict, merged with internal task params +- **Response Structure**: Returns dict with `errorId`, `taskId`, `status`, `solution` fields +- **Context Managers**: Support `with` and `async with` for session cleanup From 4c097991e5ff12bff95b0e7de564aa9cabd19a62 Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Jan 2026 00:02:10 +0300 Subject: [PATCH 14/17] Create AGENTS.md --- src/python3_capsolver/core/AGENTS.md | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/python3_capsolver/core/AGENTS.md diff --git a/src/python3_capsolver/core/AGENTS.md b/src/python3_capsolver/core/AGENTS.md new file mode 100644 index 00000000..f91cf1d2 --- /dev/null +++ b/src/python3_capsolver/core/AGENTS.md @@ -0,0 +1,40 @@ +# CORE MODULE + +**Generated:** 2026-01-13 + +## OVERVIEW +Core module provides foundational classes for synchronous (`requests`) and asynchronous (`aiohttp`) captcha solving operations. + +Base classes establish patterns for Sync/Async instruments, enabling dual concurrency support across the library. Serialization leverages `msgspec` for high-performance JSON handling. + +## STRUCTURE +``` +src/python3_capsolver/core/ +├── base.py # CaptchaParams entry class (Sync/Async handlers) +├── captcha_instrument.py # CaptchaInstrumentBase, FileInstrument +├── aio_captcha_instrument.py # AIOCaptchaInstrument (async implementation) +├── sio_captcha_instrument.py # SIOCaptchaInstrument (sync implementation) +├── serializer.py # Request/Response msgspec Struct classes +├── enum.py # EndpointPostfixEnm, CaptchaTypeEnm, ResponseStatusEnm +├── const.py # API URLs, retry configurations +└── utils.py # Utility functions (attempts_generator) +``` + +## WHERE TO LOOK +| Task | File | Notes | +|------|------|-------| +| **Entry Point** | `base.py` | `CaptchaParams` class with `captcha_handler()` and `aio_captcha_handler()` | +| **Base Classes** | `captcha_instrument.py` | `CaptchaInstrumentBase` for instruments, `FileInstrument` for file processing | +| **Sync Instrument** | `sio_captcha_instrument.py` | `SIOCaptchaInstrument` - requests-based implementation | +| **Async Instrument** | `aio_captcha_instrument.py` | `AIOCaptchaInstrument` - aiohttp-based implementation | +| **Serialization** | `serializer.py` | `PostRequestSer`, `CaptchaResponseSer`, `MyBaseModel.to_dict()` | +| **Enums** | `enum.py` | `CaptchaTypeEnm`, `ResponseStatusEnm`, `EndpointPostfixEnm` | +| **Configuration** | `const.py` | `REQUEST_URL`, `RETRIES`, `VALID_STATUS_CODES` | + +## CONVENTIONS +- **Base Classes**: All instruments inherit from `CaptchaInstrumentBase` +- **Dual Support**: Every captcha operation provides both sync and async methods +- **Serialization**: `msgspec.Struct` classes with `to_dict()` method for API payloads +- **Retries**: `tenacity` for async, `requests.Retry` for sync (5 attempts, exponential backoff) +- **File Processing**: `FileInstrument` handles local files, URLs, and base64 in both sync/async contexts +- **Session Management**: Instruments maintain their own HTTP sessions with retry adapters From d07c421900cc6b23c73504194345bce074d5c957 Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Jan 2026 00:02:20 +0300 Subject: [PATCH 15/17] Create AGENTS.md --- tests/AGENTS.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/AGENTS.md diff --git a/tests/AGENTS.md b/tests/AGENTS.md new file mode 100644 index 00000000..3f65515a --- /dev/null +++ b/tests/AGENTS.md @@ -0,0 +1,31 @@ +# TESTS SUITE + +## OVERVIEW +Pytest-based test suite validating API integration, dual-mode (sync/async) operations, and error handling for all captcha services. + +## STRUCTURE +``` +tests/ +├── conftest.py # BaseTest class, fixtures, test utilities +├── test_*.py # Test modules (match source structure) +└── files/ # Test assets (e.g., captcha_example.jpeg) +``` + +## WHERE TO LOOK +| Task | Location | Notes | +|------|----------|-------| +| **Base Test Class** | `tests/conftest.py` | `BaseTest` with utilities (`get_random_string`, `read_image`) | +| **Fixtures** | `tests/conftest.py` | `delay_func` (1s), `delay_class` (2s) for rate limiting | +| **Core Tests** | `tests/test_core.py` | Base logic, retries, enums, context managers | +| **Service Tests** | `tests/test_*.py` | Per-service tests (recaptcha, cloudflare, datadome, etc.) | +| **Instrument Tests** | `tests/test_instrument.py` | File processing, instruments | +| **Pytest Config** | `pyproject.toml` | `asyncio_mode = "auto"`, testpaths | + +## CONVENTIONS +- **Framework**: Pytest 7.0+ with `pytest-asyncio` (auto mode). +- **Dual Testing**: Every sync test (`def test_*`) has async counterpart (`async def test_aio_*`). +- **Parametrization**: Use `@pytest.mark.parametrize` for multiple captcha types in single test. +- **Base Class**: All tests inherit from `BaseTest` for common utilities and rate limiting. +- **Context Managers**: Test both `with` and `async with` patterns for resource cleanup. +- **Rate Limiting**: Default delays (1s function, 2s class) to avoid API throttling. +- **Error Testing**: Verify `errorId`, `errorCode`, and `solution=None` for invalid keys. From 9428cb15014af6ecbda810005ead03806f6285c8 Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Jan 2026 00:03:38 +0300 Subject: [PATCH 16/17] Update Makefile --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index a71e5c31..f5d8358b 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +.PHONY: install remove refactor lint build upload tests doc + install: pip3 install -e . From 5cc21f80366a3ef4729a9aed1e8d2d2facc7ab57 Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 14 Jan 2026 00:03:45 +0300 Subject: [PATCH 17/17] 1.1.1 --- src/python3_capsolver/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python3_capsolver/__version__.py b/src/python3_capsolver/__version__.py index 6849410a..a82b376d 100644 --- a/src/python3_capsolver/__version__.py +++ b/src/python3_capsolver/__version__.py @@ -1 +1 @@ -__version__ = "1.1.0" +__version__ = "1.1.1"