chromesolver

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 17 Imported by: ? modules, 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

Overview

Package chromesolver is a cloudfetch.Solver that clears challenges, including Managed and Interactive Challenges, in headless Chrome, clicking the Turnstile checkbox when one appears. It needs Chrome installed.

client := cloudfetch.New(cloudfetch.WithSolver(chromesolver.New()))

cf_clearance is tied to the IP, so with a proxy, pass chromedp.ProxyServer to WithAllocatorOptions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Solver)

Option configures a Solver.

func WithAllocatorOptions

func WithAllocatorOptions(opts ...chromedp.ExecAllocatorOption) Option

WithAllocatorOptions adds Chrome options, such as chromedp.ProxyServer, over the defaults.

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets how long one Solve may take, including starting Chrome. Defaults to 60s.

type Solver

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

Solver starts a fresh Chrome per Solve. It is safe for concurrent use.

func New

func New(opts ...Option) *Solver

New returns a Solver with the given options.

func (*Solver) Solve

func (s *Solver) Solve(ctx context.Context, u *url.URL) (*cloudfetch.Clearance, error)

Solve loads u in Chrome and returns its cookies once cf_clearance is set.

Jump to

Keyboard shortcuts

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