Documentation ¶
Index ¶
- type CaptchaResponse
- func SolveHCaptcha(payload *HCaptchaPayload) (*CaptchaResponse, error)
- func SolveImageCaptcha(payload *ImageCaptchaPayload) (*CaptchaResponse, error)
- func SolveRecaptchaV2(payload *RecaptchaV2Payload) (*CaptchaResponse, error)
- func SolveRecaptchaV3(payload *RecaptchaV3Payload) (*CaptchaResponse, error)
- type HCaptchaPayload
- type ImageCaptchaPayload
- type RecaptchaV2Payload
- type RecaptchaV3Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptchaResponse ¶
type CaptchaResponse struct { // The task ID of the solved captcha TaskId string // The answer of the solved captcha Solution string // The service used for solving the captcha // this is used when reporting a good/bad captcha Service string // The service endpoint, it's copied from CustomServiceUrl Endpoint string // The API key for the service that's used for solving ServiceApiKey string }
func SolveHCaptcha ¶
func SolveHCaptcha(payload *HCaptchaPayload) (*CaptchaResponse, error)
SolveHCaptcha solves hCaptcha
func SolveImageCaptcha ¶
func SolveImageCaptcha(payload *ImageCaptchaPayload) (*CaptchaResponse, error)
SolveImageCaptcha solves an image captcha
func SolveRecaptchaV2 ¶
func SolveRecaptchaV2(payload *RecaptchaV2Payload) (*CaptchaResponse, error)
SolveRecaptchaV2 solves recaptcha V2
func SolveRecaptchaV3 ¶
func SolveRecaptchaV3(payload *RecaptchaV3Payload) (*CaptchaResponse, error)
SolveRecaptchaV3 solves recaptcha V3
func (*CaptchaResponse) ReportBadRecaptcha ¶
func (response *CaptchaResponse) ReportBadRecaptcha()
func (*CaptchaResponse) ReportGoodRecaptcha ¶
func (response *CaptchaResponse) ReportGoodRecaptcha()
type HCaptchaPayload ¶
type HCaptchaPayload struct { // This is the endpoint that has Recaptcha Protection EndpointUrl string // This is the HCaptcha Key // Can be found on the Endpoint URL page EndpointKey string // The API key for your captcha service ServiceApiKey string // The name of the captcha service // Can be AntiCaptcha, 2Captcha or CapMonster Cloud ServiceName string // Set this in case you're using a custom solver like CapMonster (not cloud) CustomServiceUrl string // The time to wait before starting to poll result InitialWaitTime int // The time to wait between polling results PollInterval int // Max amount of poll attempts MaxRetries int }
func (*HCaptchaPayload) CreateHCaptchaResponse ¶
func (p *HCaptchaPayload) CreateHCaptchaResponse() *CaptchaResponse
func (*HCaptchaPayload) SetDefaultValues ¶
func (p *HCaptchaPayload) SetDefaultValues()
type ImageCaptchaPayload ¶
type ImageCaptchaPayload struct { // This is the base64 that represents the image captcha Base64String string // The API key for your captcha service ServiceApiKey string // The name of the captcha service // Can be AntiCaptcha, 2Captcha or CapMonster Cloud ServiceName string // Set this in case you're using a custom solver like CapMonster (not cloud) CustomServiceUrl string // Set to true if captcha is case sensitive CaseSensitive bool // Set this if the human solver needs additional information // about how to solve the captcha InstructionsForSolver string // The time to wait before starting to poll result InitialWaitTime int // The time to wait between polling results PollInterval int // Max amount of poll attempts MaxRetries int }
func (*ImageCaptchaPayload) CreateImageCaptchaResponse ¶
func (p *ImageCaptchaPayload) CreateImageCaptchaResponse() *CaptchaResponse
func (*ImageCaptchaPayload) SetDefaultValues ¶
func (p *ImageCaptchaPayload) SetDefaultValues()
type RecaptchaV2Payload ¶
type RecaptchaV2Payload struct { // This is the endpoint that has Recaptcha Protection EndpointUrl string // This is the Recaptcha Key // Can be found on the Endpoint URL page EndpointKey string // The API key for your captcha service ServiceApiKey string // The name of the captcha service // Can be AntiCaptcha, 2Captcha or CapMonster Cloud ServiceName string // Enable if endpoint has invisible Recaptcha V2 IsInvisibleCaptcha bool // Set this in case you're using a custom solver like CapMonster (not cloud) CustomServiceUrl string // The time to wait before starting to poll result InitialWaitTime int // The time to wait between polling results PollInterval int // Max amount of poll attempts MaxRetries int // Enable if endpoint has enterprise Recaptcha V2 IsEnterpriseCaptcha bool }
func (*RecaptchaV2Payload) CreateRecaptchaResponse ¶
func (p *RecaptchaV2Payload) CreateRecaptchaResponse() *CaptchaResponse
func (*RecaptchaV2Payload) SetDefaultValues ¶
func (p *RecaptchaV2Payload) SetDefaultValues()
type RecaptchaV3Payload ¶
type RecaptchaV3Payload struct { // This is the endpoint that has Recaptcha Protection EndpointUrl string // This is the Recaptcha Key // Can be found on the Endpoint URL page EndpointKey string // The API key for your captcha service ServiceApiKey string // The name of the captcha service // Can be AntiCaptcha, 2Captcha or CapMonster Cloud ServiceName string // The action name of the recaptcha, you can find it in source code of site Action string // Set this in case you're using a custom solver like CapMonster (not cloud) CustomServiceUrl string // Set to true if it's V3 Enterprise IsEnterprise bool // Defaults to 0.3, accepted values are 0.3, 0.6, 0.9 MinScore float32 // The time to wait before starting to poll result InitialWaitTime int // The time to wait between polling results PollInterval int // Max amount of poll attempts MaxRetries int }
func (*RecaptchaV3Payload) CreateRecaptchaResponse ¶
func (p *RecaptchaV3Payload) CreateRecaptchaResponse() *CaptchaResponse
func (*RecaptchaV3Payload) SetDefaultValues ¶
func (p *RecaptchaV3Payload) SetDefaultValues()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.