Skip to content

Expose solution cost from getTaskResult - #56

Merged
grk717 merged 1 commit into
mainfrom
sdk-bot/fedc0362-expose-solution-cost-from-gettaskresult-8ab8
Nov 19, 2026
Merged

grk717 merged 1 commit into
mainfrom
sdk-bot/fedc0362-expose-solution-cost-from-gettaskresult-8ab8

Conversation

@capmonster-sdk-bot

Copy link
Copy Markdown

Context

The getTaskResult response contains cost (Float): "Solution cost in US dollars (USD). ... The field is returned only in the ready response, when status is ready." Source: https://docs.capmonster.cloud/docs/api/methods/get-task-result.txt

Changes

  • capmonstercloud_client/captchaResult.py: add cost: Optional[float] = None to CaptchaResult.
  • capmonstercloud_client/CapMonsterCloudClient.py: in _solve, on ready read cost and, when present, return the solution dict with an extra cost key. Without cost the returned dict is unchanged.
  • capmonstercloud_client/version.txt: 4.4.0 -> 4.4.1.
  • test/cost_test.py: new tests for CaptchaResult.cost, solution with cost, and response without cost.

Testing

python test/cost_test.py (mocked, no network).

Open questions

None.


Prepared automatically by the SDK update bot. Please review before merging.

@grk717
grk717 merged commit e34fda9 into main Nov 19, 2026
5 checks passed
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