twocaptcha

package
v0.0.0-...-abf672c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	APIKey     string
	Settings   SettingInfo
	HTTPClient *fasthttp.Client
}

Instance contains fields required for interfacing with the 2captcha API including the user's API key, necessary settings (time between requests) and HTTP client for sending requests.

func NewInstance

func NewInstance(apiKey string, settings SettingInfo) (instance Instance, finalErr error)

NewInstance creates and populates a new Instance. If any error is encountered during initialization, NewInstance returns an empty Instance and whatever error was found, else it returns the populated instance and nil error.

func (*Instance) SolveFuncaptcha

func (instance *Instance) SolveFuncaptcha(sitekey string, surl string, siteurl string) (solution string, finalErr error)

SolveFuncaptcha solves Arkose Funcaptcha

func (*Instance) SolveRecaptchaV2

func (instance *Instance) SolveRecaptchaV2(sitekey string, siteurl string) (solution string, finalErr error)

SolveRecaptchaV2 solves Google RecaptchaV2

func (*Instance) SolveRecaptchaV3

func (instance *Instance) SolveRecaptchaV3(
	sitekey string, siteurl string, action string, minScore string,
) (solution string, finalErr error)

SolveRecaptchaV3 solves Google RecaptchaV3

type SettingInfo

type SettingInfo struct {
	TimeBetweenRequests int
}

SettingInfo contains settings info like time between successive checking requests. These settings are passed into the captcha constructor by the user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL