Documentation
¶
Index ¶
- type FunCaptchaOptions
- type HCaptchaEnterprise
- type HCaptchaOptions
- type Proxy
- type ProxyLogon
- type ProxyType
- type RecaptchaV2Options
- type RecaptchaV3Options
- type Solution
- type SolveService
- type Solver
- func (s *Solver) FunCaptcha(o FunCaptchaOptions) (*Solution, error)
- func (s *Solver) GetBalance() (float64, error)
- func (s *Solver) GetService() SolveService
- func (s *Solver) HCaptcha(o HCaptchaOptions) (*Solution, error)
- func (s *Solver) RecaptchaV2(o RecaptchaV2Options) (*Solution, error)
- func (s *Solver) RecaptchaV3(o RecaptchaV3Options) (*Solution, error)
- func (s *Solver) SetService(service SolveService) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FunCaptchaOptions ¶
type FunCaptchaOptions struct {
PageURL string
PublicKey string
// Subdomain also known as surl is optional
Subdomain string
// Proxy is optional but recommended
Proxy *Proxy
// UserAgent is required
UserAgent string
// Data is the extra data. Can look like: {"\blob\":\"HERE_COMES_THE_blob_VALUE\"}
Data string
}
type HCaptchaEnterprise ¶
type HCaptchaEnterprise struct {
RQData string
Sentry bool
APIEndpoint string
Endpoint string
ReportAPI string
AssetHost string
ImgHost string
}
HCaptchaEnterprise Not every captcha service supports every field here
type HCaptchaOptions ¶
type ProxyLogon ¶
func (*ProxyLogon) String ¶
func (pl *ProxyLogon) String() string
type RecaptchaV2Options ¶
type RecaptchaV2Options struct {
// SiteKey is the site key of the recaptcha
SiteKey string
// PageURL is the URL of the page where the reCAPTCHA is located
PageURL string
// DataS is the data-s attribute of the reCAPTCHA element (optional)
DataS string
// Proxy is the proxy to use for the captcha (optional)
Proxy *Proxy
// UserAgent is the user agent to use for the captcha (optional)
UserAgent string
// Cookies is the cookies to use for the captcha (optional)
Cookies map[string]string
// Invisible is whether the captcha is invisible or not (optional)
Invisible bool
// Enterprise only works on some captcha services (optional)
Enterprise map[string]interface{}
}
type RecaptchaV3Options ¶
type RecaptchaV3Options struct {
PageURL string
SiteKey string
Enterprise bool
// MinScore should only be 0.3, 0.7, or 0.9
MinScore float64
// Action is the page_action in the requests
Action string
}
RecaptchaV3Options All fields are required
type Solution ¶
type Solution struct {
Text string
TaskId int
// Speed the time in milliseconds that the captcha took to solve
Speed int64
// Cookies can be nil or empty if the service does not return cookies
Cookies map[string]string
// Cost can be "" if the service does not return cost
Cost string
// IP can be "" if the service does not return IP
IP string
}
type SolveService ¶
type SolveService = string
const ( AntiCaptcha SolveService = "anticaptcha" AnyCaptcha SolveService = "anycaptcha" CapSolver SolveService = "capsolver" TwoCaptcha SolveService = "2captcha" CapMonster SolveService = "capmonster" )
type Solver ¶
type Solver struct {
// UpdateDelay is the delay between each update getTaskResult request
UpdateDelay time.Duration
// Disabling Verbose will disable all logging
Verbose bool
// ApiKey is the key used to authenticate with the service
ApiKey string
// ForcedDomain don't edit unless you know what you're doing.
// This is used to allow the user to change their captcha service to whatever
// they want as long as they share the same api methods.
ForcedDomain string
// contains filtered or unexported fields
}
func (*Solver) FunCaptcha ¶
func (s *Solver) FunCaptcha(o FunCaptchaOptions) (*Solution, error)
func (*Solver) GetBalance ¶
GetBalance returns the balance of the account
func (*Solver) GetService ¶
func (s *Solver) GetService() SolveService
func (*Solver) RecaptchaV2 ¶
func (s *Solver) RecaptchaV2(o RecaptchaV2Options) (*Solution, error)
RecaptchaV2 solves a recaptcha v2
func (*Solver) RecaptchaV3 ¶
func (s *Solver) RecaptchaV3(o RecaptchaV3Options) (*Solution, error)
func (*Solver) SetService ¶
func (s *Solver) SetService(service SolveService) error
Click to show internal directories.
Click to hide internal directories.