fix(google): submit captcha form instead of calling removed submitCallback()#34
Open
versaflow wants to merge 1 commit into
Open
fix(google): submit captcha form instead of calling removed submitCallback()#34versaflow wants to merge 1 commit into
versaflow wants to merge 1 commit into
Conversation
…lback() After 2captcha returns a token, solveCaptcha() set #g-recaptcha-response and called submitCallback(). Google's current /sorry/ page no longer defines submitCallback(), so the page.Eval threw "TypeError: Cannot read properties of undefined (reading 'apply')" and the solved (paid-for) token was discarded — every Google solve failed with "captcha detected" despite a successful 2captcha solve. Set the token on #g-recaptcha-response (value + innerHTML), call submitCallback() only when it still exists, otherwise submit the captcha form directly, then WaitLoad for Google's redirect back to the SERP. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
When the 2captcha solver is enabled,
solveCaptcha()ingoogle/search.goset#g-recaptcha-responsethen calledsubmitCallback(). Google’s current/sorry/interstitial no longer definessubmitCallback(), so the eval throws:The 2captcha solve succeeds (token returned and billed) but is never applied, so every Google search still fails with
captcha detected/429.Fix: set the token on
#g-recaptcha-response(value+innerHTML), callsubmitCallback()only when it still exists, otherwise submit the captcha form directly (form#captcha-form/form[action*="sorry"]/ firstform), thenWaitLoadfor the redirect back to the SERP. No behaviour change whensubmitCallbackis present; this only adds a fallback for the current page structure.🤖 Generated with Claude Code