Skip to content

feat: sync with the current CapMonster Cloud API (5.1, no breaking changes) - #78

Merged
alperensert merged 7 commits into
masterfrom
feat/docs-sync-5.1
Nov 19, 2026
Merged

alperensert merged 7 commits into
masterfrom
feat/docs-sync-5.1

Conversation

@alperen-io

@alperen-io alperen-io Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Brings the SDK in line with the current CapMonster Cloud docs (capmonster-captcha-solver-docs at b74add2, 2026-11-18). Nothing breaks: everything that changed shape keeps working and emits a DeprecationWarning, to be removed in 6.0. release-please should cut 5.1.0.

Fixes

  • Hunt: sends CustomTask / class: HUNT with HuntMetadata (apiGetLib, plus data or widgetUrl) and requires a proxy. HuntTask(websiteKey=...) still sends the old HuntTask request, with a warning.
  • Imperva: sends incapsulaCookies (the old code sent incapsulaCookie, which the API doesn't document). The old keyword is still accepted, with a warning. Adds proxy.
  • Image recognition: adds bls_3x3, which needs taskArgument. The old bls value is still sent unchanged, with a warning. Also adds baidu, bills_audio (sends PayloadType: Audio), dli, MathSum, portugal_text_find_icon, and taskArgument → TaskArgument.
  • Turnstile challenge, token mode: apiJsUrl is no longer required and a proxy is allowed, as in the docs. This only relaxes validation.

New

  • Task types: AlibabaTask, FriendlyTask, FengkongCloudTask, ARCaptchaTask, HeyTapTask, ProtonTask.
  • Fields:
    • minScore on reCAPTCHA v2 Enterprise
    • TenDI metadata (captchaUrl, aidEncrypted), and TenDI proxy is now optional
    • DataDome datadomeVersion
    • Turnstile pageData
  • Task cost: get_task_result_detailed, join_task_result_detailed and solve_detailed (plus their async versions) return a TaskResult with status, solution and cost. The existing methods still return only the solution dict.
  • Proxy warnings: DataDome, FunCaptcha and Imperva emit a UserWarning without a proxy, since the API requires one.

Deprecated

RecaptchaClickTask, TemuTask and CastleTask now emit a warning; their behaviour is unchanged.

  • reCAPTCHA (click): the docs describe it as ComplexImageTask, i.e. ComplexImageRecaptchaTask.
  • Temu, Castle: the docs have unpublished their pages.

Testing

  • pytest tests/: 124 passed, 24 skipped (the skipped ones need API_KEY).
  • The unmodified test suite from master passes against this branch (77 passed).
  • import capmonster_python emits no warnings.
  • The new docs examples run, and their payloads match the request JSON in the CapMonster docs.
  • Not tested against the live API, since that needs a key.

🤖 Generated with Claude Code

alperen-io Bot added 6 commits November 19, 2026 13:13
…the current API

- HuntTask sends CustomTask/HUNT with HuntMetadata (apiGetLib, data or
  widgetUrl) and requires a proxy. The old websiteKey form still sends the
  legacy request but emits a DeprecationWarning.
- ImpervaTaskMetadata sends incapsulaCookies; incapsulaCookie is still
  accepted with a DeprecationWarning. ImpervaTask gains a proxy field.
- ComplexImageRecognitionTask sends bls_3x3 for the deprecated "bls", adds
  baidu, bills_audio, dli, MathSum and portugal_text_find_icon, and
  taskArgument (TaskArgument).
- TurnstileCloudFlareTask token mode no longer requires apiJsUrl or forbids
  a proxy, and gains pageData, matching the docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: alperen-io[bot] <347392299+alperen-io[bot]@users.noreply.github.com>
- TenDITask: metadata (captchaUrl, aidEncrypted); proxy is now optional.
- DataDomeMetadata: datadomeVersion.
- RecaptchaV2EnterpriseTask: minScore.
- DataDomeTask and FunCaptchaTask warn when no proxy is given, since the
  API requires one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: alperen-io[bot] <347392299+alperen-io[bot]@users.noreply.github.com>
…ton tasks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: alperen-io[bot] <347392299+alperen-io[bot]@users.noreply.github.com>
They emit a DeprecationWarning and will be removed in 6.0. The API docs
describe reCAPTCHA (click) as ComplexImageTask (ComplexImageRecaptchaTask)
and no longer list Temu or Castle. Behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: alperen-io[bot] <347392299+alperen-io[bot]@users.noreply.github.com>
getTaskResult now returns the task's cost. get_task_result_detailed,
join_task_result_detailed and solve_detailed (and their async versions)
return a TaskResult with status, solution and cost. The existing methods
still return only the solution dict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: alperen-io[bot] <347392299+alperen-io[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: alperen-io[bot] <347392299+alperen-io[bot]@users.noreply.github.com>
@alperen-io
alperen-io Bot requested a review from alperensert as a code owner November 19, 2026 13:13
- ComplexImageRecognitionTask(task="bls") now sends "bls" as before, with
  the DeprecationWarning, instead of a bls_3x3 request without the
  TaskArgument the API requires.
- A legacy HuntTask(websiteKey=...) reports type "HuntTask", matching the
  request it sends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: alperen-io[bot] <347392299+alperen-io[bot]@users.noreply.github.com>
@alperensert
alperensert merged commit 8b671ce into master Nov 19, 2026
1 check passed
@alperensert
alperensert deleted the feat/docs-sync-5.1 branch November 19, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant