Official Go client library for capmonster.cloud captcha recognition service
package main
import (
"fmt"
"github.com/ZennoLab/capmonstercloud-client-go/pkg/client"
"github.com/ZennoLab/capmonstercloud-client-go/pkg/tasks"
)
func main() {
client := client.New("YourClientKey")
//get balance
if balance, err := client.GetBalance(); err != nil {
fmt.Println(err)
} else {
fmt.Println(balance)
}
// solve RecaptchaV2 (without proxy)
recaptchaV2Task := tasks.NewRecaptchaV2TaskProxyless(
"https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high",
"6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd",
)
noCache := false
if result, err := client.SolveRecaptchaV2Proxyless(recaptchaV2Task, noCache, nil); err != nil {
fmt.Println(err)
} else {
fmt.Println(result)
}
// solve ImageToTextTask with module
imgToTextTask := tasks.NewImageToTextTask("BODY").WithCapMonsterModule(tasks.CapMonsterModuleGoogle)
if result, err := client.SolveImageToText(imgToTextTask, nil); err != nil {
fmt.Println(err)
} else {
fmt.Println(result)
}
}
Supported captcha recognition requests:
- GeeTestProxylessRequest
- GeeTestRequest
- HCaptchaProxylessRequest
- HCaptchaRequest
- ImageToTextRequest
- RecaptchaV2ProxylessRequest
- RecaptchaV2Request
- RecaptchaV3ProxylessRequest
- RecaptchaV2EnterpriseProxylessRequest
- RecaptchaV2EnterpriseRequest
- TurnstileProxylessRequest
- TurnstileRequest
- RecaptchaComplexImageTaskRequest
- HcaptchaComplexImageTaskRequest