rucaptcha

package module
v0.0.0-...-a10fdcb Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 9 Imported by: 0

README

ruCaptcha

ruCaptcha

Little wrapper for rucaptcha API

Go get

go get github.com/koteezy/ruCaptcha

Solve a captcha from a url, or base64

re := ruCaptcha.New("APIKEY")
captcha, err := re.Default("url or base64")

Solve a google recaptcha

re := ruCaptcha.New("APIKEY")
captcha, err := re.ReCaptcha("Page url", "Google Site Key")

Incorrectly solved captcha

If, after the checks, it turns out that the captcha has been solved incorrectly - you can complain about the wrong captcha. The last captcha ID is sent to the server.

re := ruCaptcha.New("APIKEY")
captcha, err := re.Default("Page url")

if captcha !== 3952 {
    error := re.Report()

    // if error ...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter struct {
	// contains filtered or unexported fields
}

type RuCaptcha

type RuCaptcha struct {
	Id            string
	ApiKey        string
	Sleep         time.Duration
	ImageResponse http.Response
	Proxy         string
	ProxyType     string
	Debug         bool
}

func New

func New(apiKey string) *RuCaptcha

func (*RuCaptcha) Default

func (ruCaptcha *RuCaptcha) Default(urlOrBase64 string) (string, error)

Default captcha

func (*RuCaptcha) ReCaptcha

func (ruCaptcha *RuCaptcha) ReCaptcha(pageUrl string, googleSiteKey string) (string, error)

Trying to solve google Recaptcha

func (*RuCaptcha) Report

func (ruCaptcha *RuCaptcha) Report() error

Complain last solved a captcha, because she solved incorrectly

func (*RuCaptcha) SetProxy

func (ruCaptcha *RuCaptcha) SetProxy(proxy string, proxyType string)

Jump to

Keyboard shortcuts

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