headless

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveURL

type ActiveURL struct {
	URL       string    `json:"url"`
	StartTime time.Time `json:"start_time"`
	Duration  string    `json:"duration"`
	Depth     int       `json:"depth"`
}

ActiveURL represents a URL currently being processed

type CrawlDebugger

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

CrawlDebugger tracks active URLs for debugging

func NewCrawlDebugger

func NewCrawlDebugger(httpPort int) *CrawlDebugger

NewCrawlDebugger creates a new debugger instance

func (*CrawlDebugger) Close

func (cd *CrawlDebugger) Close()

func (*CrawlDebugger) EndURL

func (cd *CrawlDebugger) EndURL(url string)

EndURL marks a URL as finished processing

func (*CrawlDebugger) GetActiveURLs

func (cd *CrawlDebugger) GetActiveURLs() []ActiveURL

GetActiveURLs returns currently active URLs with durations

func (*CrawlDebugger) StartURL

func (cd *CrawlDebugger) StartURL(url string, depth int)

StartURL marks a URL as being processed

type Headless

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

func New

func New(options *types.CrawlerOptions) (*Headless, error)

New returns a new headless crawler instance

func (*Headless) Close

func (h *Headless) Close() error

func (*Headless) Crawl

func (h *Headless) Crawl(URL string) error

Crawl executes the headless crawling on a given URL

func (*Headless) SetHooks

func (h *Headless) SetHooks(hooks *Hooks)

SetHooks installs lifecycle callbacks on the headless engine. The supplied struct is copied, so mutating it after SetHooks returns has no effect on the engine; call SetHooks again to change the installed hooks. Passing nil clears any previously installed hooks. SetHooks is not safe to call concurrently with Crawl on the same engine.

type Hooks

type Hooks = crawler.Hooks

Hooks re-exports crawler.Hooks so library users can configure headless lifecycle callbacks without importing the internal crawler sub-package. See crawler.Hooks for field-level documentation and semantics.

Directories

Path Synopsis
cookie
Package cookie implements cookie consent handling for the crawler.
Package cookie implements cookie consent handling for the crawler.
stealth
from stealth go-rod
from stealth go-rod
js
normalizer/simhash
Package simhash implements SimHash algorithm for near-duplicate detection.
Package simhash implements SimHash algorithm for near-duplicate detection.
Package graph implements a Directed Graph for storing state information during crawling of a Web Application.
Package graph implements a Directed Graph for storing state information during crawling of a Web Application.

Jump to

Keyboard shortcuts

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