scraper

package
v2.0.0-...-d9de127 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromDir

func FromDir(dirname string, activestr string) (ffuf.Scraper, ffuf.Multierror)

Types

type Scraper

type Scraper struct {
	Rules []*ScraperRule
}

func (*Scraper) AppendFromFile

func (s *Scraper) AppendFromFile(path string) error

FromFile initializes a scraper instance and reads rules from a file

func (*Scraper) Execute

func (s *Scraper) Execute(resp *ffuf.Response, matched bool) []ffuf.ScraperResult

type ScraperGroup

type ScraperGroup struct {
	Rules  []*ScraperRule `json:"rules"`
	Name   string         `json:"groupname"`
	Active bool           `json:"active"`
}

type ScraperRule

type ScraperRule struct {
	Name   string `json:"name"`
	Rule   string `json:"rule"`
	Target string `json:"target"`

	Type        string   `json:"type"`
	OnlyMatched bool     `json:"onlymatched"`
	Action      []string `json:"action"`
	// contains filtered or unexported fields
}

func (*ScraperRule) Check

func (r *ScraperRule) Check(data string) []string

Jump to

Keyboard shortcuts

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