Skip to content

Commit

Permalink
added parametr enterprise (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
PBadicean authored Jun 28, 2023
1 parent 1fe8b21 commit 29b87cb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The easiest way to quickly integrate [2Captcha] into your code to automate solvi
- [Text](#text-captcha)
- [ReCaptcha v2](#recaptcha-v2)
- [ReCaptcha v3](#recaptcha-v3)
- [reCAPTCHA Enterprise](#recaptcha-enterprise)
- [FunCaptcha](#funcaptcha)
- [GeeTest](#geetest)
- [hCaptcha](#hcaptcha)
Expand Down Expand Up @@ -167,6 +168,34 @@ req.SetProxy("HTTPS", "login:password@IP_address:PORT")
code, err := client.Solve(req)
```

### reCAPTCHA Enterprise
reCAPTCHA Enterprise can be used as reCAPTCHA V2 and reCAPTCHA V3. Below is a usage example for both versions.

```go
// reCAPTCHA V2
cap := api2captcha.ReCaptcha({
SiteKey: "6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-",
Url: "https://mysite.com/page/with/recaptcha",
Invisible: true,
Action: "verify",
Enterprise: true,
})

// reCAPTCHA V3
cap := api2captcha.ReCaptcha{
SiteKey: "6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-",
Url: "https://mysite.com/page/with/recaptcha",
Version: "v3",
Action: "verify",
Score: 0.3,
Enterprise: true,
}

req := cap.ToRequest()
req.SetProxy("HTTPS", "login:password@IP_address:PORT")
code, err := client.Solve(req)
```

### FunCaptcha
FunCaptcha (Arkoselabs) solving method. Returns a token.

Expand Down
4 changes: 4 additions & 0 deletions api2captcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ type (
SiteKey string
Url string
Invisible bool
Enterprise bool
Version string
Action string
Score float64
Expand Down Expand Up @@ -717,6 +718,9 @@ func (c *ReCaptcha) ToRequest() Request {
if c.Invisible {
req.Params["invisible"] = "1"
}
if c.Enterprise {
req.Params["enterprise"] = "1"
}
if c.Version != "" {
req.Params["version"] = c.Version
}
Expand Down

0 comments on commit 29b87cb

Please sign in to comment.