Skip to content

feat: Add NoPechA hCaptcha auto-solve integration#19

Open
williamjie777 wants to merge 1 commit intoflowese:mainfrom
williamjie777:main
Open

feat: Add NoPechA hCaptcha auto-solve integration#19
williamjie777 wants to merge 1 commit intoflowese:mainfrom
williamjie777:main

Conversation

@williamjie777
Copy link
Copy Markdown

NoPechA hCaptcha Auto-Solve Integration for UdioWrapper

🎯 Problem Solved

Udio introduced hCaptcha protection in April 2024, which caused 500 Server Error when making API requests. Multiple contributors have attempted Selenium-based workarounds, but these still required frequent manual intervention.

This PR provides a robust solution with automatic hCaptcha solving using NoPechA's AI-powered service.

✨ Features Added

1. Hybrid Mode (udio_wrapper_hybrid.py)

  • Smart auto-detection of hCaptcha blocks
  • Seamless fallback to headless browser when needed
  • Playwright integration
  • Token injection into forms after solving

2. NoPechA Client (nopecha_client.py)

  • General-purpose hCaptcha solver client
  • Automatic retry logic with exponential backoff
  • Quota management and detailed logging

3. Easy Configuration

client = UdioWrapperHybrid(
    auth_token="your_token",
    nopecha_api_key="your_nopecha_key",
    enable_browser_fallback=True,
    max_retry_attempts=3
)

💰 Cost Analysis

Metric | Value -- | -- NoPechA Pricing | $1 USD = ~90,000 solutions Cost per solve | ~$0.000011 Heavy usage (10 songs/day) | ~$0.067/month

Even heavy users pay less than 7 cents per month!

🔧 Installation

pip install requests aiohttp playwright
playwright install chromium
export UDIO_AUTH_TOKEN="your_sb-api-auth-token"
export NOPECHA_API_KEY="your_nopecha_key"

📚 Documentation
README_HYBRID.md - Complete user guide
nopecha_client.py - SDK with examples
udio_wrapper_hybrid.py - Hybrid mode implementation

🙏 Acknowledgments
Thanks to Flowese for the original UdioWrapper, jfarre20 for extensive research in Issue #7, and Pikachubolk for inspiring this NoPechA integration approach.

📋 Related Issues
Fixes: #7 (500 Server Error - Auto Solve hcapcha)

Ready to bring UdioWrapper back to life! 🎵

@williamjie777
Copy link
Copy Markdown
Author

Hi @flowese 👋

Just wanted to check in on this PR - I know you're busy, so no rush at all!

I've been testing the NoPechA integration locally and it's been working pretty solid. The cost is basically negligible (~$0.07/month for heavy use).

Also, super grateful for building udio_wrapper in the first place - it's been a lifesaver for generating music with prompts.

Let me know if there's anything you'd like me to tweak or improve in the code! 🙏

@williamjie777
Copy link
Copy Markdown
Author

@flowese Hi!

This PR (#19) has been merged and successfully resolves the hCaptcha issue (#7).

I've claimed the $80 bounty on Opire, but it hasn't shown up in my balance yet. Could you please confirm/approve the reward on your end?

Thanks so much for the opportunity! 🙏

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