crawler

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

type Crawler struct {
	BaseURL        *url.URL
	MaxDepth       int
	RespectRobots  bool
	Visited        map[string]bool
	Queued         map[string]bool
	VisitedSitemap map[string]bool
	Results        []string
	Client         *http.Client
	// contains filtered or unexported fields
}

func New

func New(target string, depth int, delay time.Duration) (*Crawler, error)

func (*Crawler) SetRespectRobots

func (c *Crawler) SetRespectRobots(enabled bool)

func (*Crawler) Start

func (c *Crawler) Start(ctx context.Context) []string

type Form

type Form struct {
	ActionURL string
	Method    string
	Inputs    []FormInput
}

func ExtractForms

func ExtractForms(n *html.Node) []Form

type FormInput

type FormInput struct {
	Name  string
	Type  string
	Value string
}

func ExtractInputs

func ExtractInputs(n *html.Node) []FormInput

Jump to

Keyboard shortcuts

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