A minimal asynchronous createTask and getTaskResult client with a fixed polling budget.
English · 简体中文 · 日本語 · Español · Português · 한국어
When an authorized QA workflow needs reliable CAPTCHA solving, it should use a small, testable contract with explicit limits instead of an unbounded loop. This Python repository demonstrates one focused API pattern with CapSolver, offline fixtures, structured output, and safe stop conditions.
- One focused, independently testable API pattern.
- No real key, target, browser session, or live provider request.
- Explicit authorization, bounded work, typed results, and human stop conditions.
- Offline unit and Smoke Tests.
The implementation validates caller input, processes a fixture response through a strict policy, and returns only the fields required by the next application step. A production adapter may replace the fixture transport only for an owned or explicitly authorized target.
python3 -m unittest discover -s tests -v
python3 scripts/smoke.pyCopy .env.example only for an authorized environment. Review the official createTask request contract, getTaskResult response contract, and API error reference before adding a real transport.
All tests are offline and deterministic. They do not read CAPSOLVER_API_KEY.
Use only public data, owned systems, or targets covered by explicit written authorization. Respect terms, access controls, rate limits, minimization, retention rules, and human approval gates. Do not access private data, conceal automation, defeat risk controls, create accounts in bulk, or run unlimited collection. Sensitive personal, financial, health, employment, or education data requires purpose-specific authorization and documented safeguards.
Never commit API keys, cookies, tokens, browser profiles, private captures, or real task responses. See SECURITY.md.
Developer sharing CapSolver integration examples.
This example keeps the contract narrow enough to audit, test, and stop safely before adapting CapSolver to authorized QA.
