Skip to content

fix: auto-solve hCaptcha on 500 Server Error (fixes #7)#36

Open
bethoslabs wants to merge 1 commit into
flowese:mainfrom
bethoslabs:fix/hcaptcha-auto-solve
Open

fix: auto-solve hCaptcha on 500 Server Error (fixes #7)#36
bethoslabs wants to merge 1 commit into
flowese:mainfrom
bethoslabs:fix/hcaptcha-auto-solve

Conversation

@bethoslabs

Copy link
Copy Markdown

Fix for #7 - 500 Error / hCaptcha Auto-Solve

Added hcaptcha_solver.py with auto-detect + Capsolver/2captcha/manual fallback.
make_request() now retries with solved CAPTCHA token on 500 errors.

Key improvements over existing PR #32:

  • Dynamic site key extraction - no hardcoded placeholder keys
  • 2captcha fallback support in addition to Capsolver
  • 5-minute token caching to avoid re-solving on every request
  • Clean implementation without dead code or binary files

Changes

  • New hcaptcha_solver.py module with detect_hcaptcha(), solve_hcaptcha(), and ensure_token()
  • make_request() retries with fresh captcha token on 500/403/429 errors
  • Token caching with 5-minute TTL
  • Set CAPSOLVER_API_KEY or CAPTCHA_API_KEY env var for auto-solve

Usage

from udio_wrapper import UdioWrapper

# Set env var before creating the wrapper
# export CAPSOLVER_API_KEY=your_key_here

wrapper = UdioWrapper(auth_token="your_token")
# make_request() now handles captcha automatically

Fixes #7

- Added hcaptcha_solver.py with dynamic site key extraction
- Auto-solves hCaptcha via Capsolver, 2captcha, or manual fallback
- make_request() retries with fresh captcha token on 500/challenge
- Token caching with 5-minute TTL
- Set CAPSOLVER_API_KEY or CAPTCHA_API_KEY env var for auto-solve
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.

500 Server Error - Auto Solve hcapcha

1 participant