Add GeeTest v3 support (v1.1.0) - #2
Merged
Merged
Conversation
Adds geetest(gt, challenge, url) to both CapSkip and AsyncCapSkip, wrapping CapSkip's method=geetest endpoint. The answer comes back as a JSON string in `request`. It stays verbatim in `code`, so code ported from another solver's API keeps working, and is also expanded into `challenge`, `validate`, and `seccode` for direct use — unlike every other captcha type, `code` alone is not directly usable here. An unparseable payload is passed through untouched rather than masked. Submit params are limited to the documented set (gt, challenge, pageurl, api_server, json, proxy, proxytype); all three required fields are checked locally so a missing value fails before the round-trip. GeeTest uses the longer recaptchaTimeout budget rather than defaultTimeout, since it is a real browser solve with internal retries. A caller-supplied timeout still wins. Also validates proxytype against the values CapSkip actually maps (HTTP, HTTPS, SOCKS5, SOCKS5H, case-insensitive) for every proxy-capable captcha type. SOCKS4 and other values previously reached the server and returned ERROR_BAD_PARAMETERS; they now raise ValidationException locally. Image captcha is excluded so it keeps its clearer "proxy not supported" message. Verified end-to-end against a live CapSkip instance: GeeTest solves and returns all three fields, with image captcha, reCAPTCHA v2, and Turnstile unaffected.
The sentence still says the solver runs locally with no per-solve fees; only the cloud comparison is removed. Cloudflare Turnstile references are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds GeeTest v3 (slide) solving to the Python SDK, matching the GeeTest v3 API docs.
What's new
Available on both
CapSkipandAsyncCapSkip.Design notes
codekeeps the raw JSON string CapSkip returns, so code ported from another solver's API still works. The parsed fields are added alongside it — unlike every other captcha type,codealone is not directly usable for GeeTest. An unparseable payload is passed through untouched rather than masked.gt,challenge,pageurl,api_server,json,proxy,proxytype. All three required fields are checked locally, so a missing value fails before the round-trip instead of returningERROR_BAD_PARAMETERS/ERROR_PAGEURL.recaptchaTimeoutbudget rather thandefaultTimeout, since GeeTest is a real browser solve with internal retries. A caller-suppliedtimeoutstill wins. No new constructor parameter was added.apiServer/api_subdomainare accepted as aliases forapi_server.Also included
proxytypeis now validated against the values CapSkip actually maps —HTTP,HTTPS,SOCKS5,SOCKS5H, case-insensitive — for every proxy-capable captcha type.SOCKS4and other values previously reached the server and came back asERROR_BAD_PARAMETERS; they now raiseValidationExceptionlocally. Image captcha is excluded so it keeps its clearer "proxy is not supported" message.This touches reCAPTCHA and Turnstile as well as GeeTest, since they share the same submit path.
A second commit drops the "no cloud service" phrasing from the README intro; the sentence still makes the local / no-per-solve-fee point.
Testing
api_serverand its aliases, proxy handling, solution-field expansion, non-JSON payloads, the required-field checks, and every accepted/rejected proxy type.Docs
README, tutorial (new section 8), API reference, getting started, troubleshooting, and changelog all updated. Version bumped to 1.1.0;
geetestadded to the package keywords.Note
The server also supports GeeTest v4 (
method=geetest_v4,captcha_id), which this PR does not add.