captcha

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSolver

func RegisterSolver(name string, constructor SolverConstructor)

Types

type Handler

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

func NewHandler

func NewHandler(solverProvider, apiKey string) (*Handler, error)

func (*Handler) HandleIfCaptcha

func (h *Handler) HandleIfCaptcha(ctx context.Context, page *rod.Page, pageHTML string) (bool, error)

type Info

type Info struct {
	Provider Provider
	SiteKey  string
	PageURL  string
	Action   string
}

func Identify

func Identify(page *rod.Page) (*Info, error)

type Provider

type Provider string
const (
	ProviderRecaptchaV2           Provider = "recaptchav2"
	ProviderRecaptchaV3           Provider = "recaptchav3"
	ProviderRecaptchaV2Enterprise Provider = "recaptchav2enterprise"
	ProviderRecaptchaV3Enterprise Provider = "recaptchav3enterprise"
	ProviderTurnstile             Provider = "turnstile"
	ProviderHCaptcha              Provider = "hcaptcha"
)

type Solution

type Solution struct {
	Token    string
	Provider Provider
}

type Solver

type Solver interface {
	Solve(ctx context.Context, info *Info) (*Solution, error)
}

func NewSolver

func NewSolver(provider, apiKey string) (Solver, error)

type SolverConstructor

type SolverConstructor func(apiKey string) (Solver, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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