Install
openclaw skills install captcha-solver验证码识别与解决 - 本地OCR识别 + 第三方API / CAPTCHA Recognition and Solving - Local OCR + Third-party APIs
openclaw skills install captcha-solver自动识别和解决各类验证码 / Automatically recognize and solve various CAPTCHAs
# 识别图片验证码
python solve.py --image captcha.png
# 解决reCaptcha
python solve.py --recaptcha "site_key" --url "page_url"
# 滑动验证码
python solve.py --slide background.png --template slider.png
# 默认使用Tesseract
TESSERACT_CMD = "/usr/bin/tesseract"
LANG = "eng+chi_sim" # 支持中英文
# 2Captcha
API_2CAPTCHA = "your_api_key"
# Anti-Captcha
API_ANTI_CAPTCHA = "your_api_key"
from solver import CaptchaSolver
solver = CaptchaSolver()
result = solver.solve_image("captcha.png")
print(result) # 输出识别的字符
result = solver.solve_slide(bg_img, slider_img)
print(result) # 输出滑动距离
result = solver.solve_recaptcha(site_key, page_url)
print(result) # 输出token
| 服务 | 价格 | 成功率 | 速度 |
|---|---|---|---|
| 本地OCR | 免费 | 60-80% | 快 |
| 2Captcha | $2.99/1000 | 95%+ | 慢 |
| Anti-Captcha | $2.00/1000 | 95%+ | 中 |