web

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrawlOptions

type CrawlOptions struct {
	MaxDepth       int
	AllowedDomains []string
	Timeout        int
	ConcurrentJobs int
}

type CrawlResult

type CrawlResult struct {
	TreeString string
	Files      []filesystem.FileInfo
}

func ProcessWebURL

func ProcessWebURL(urlStr string, options CrawlOptions, excludePatterns []string) (*CrawlResult, error)

type Crawler

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

func NewCrawler

func NewCrawler(options CrawlOptions, startURL string) *Crawler

func (*Crawler) Crawl

func (c *Crawler) Crawl(startURL string) ([]*WebPage, error)

func (*Crawler) SetExcludePatterns

func (c *Crawler) SetExcludePatterns(patterns []string)

type WebPage

type WebPage struct {
	URL         string
	Content     string
	Title       string
	Links       []string
	Depth       int
	StatusCode  int
	ContentType string
}

Jump to

Keyboard shortcuts

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