postprocessor

package
v2.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0 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

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrPostprocessorAlreadyInitialized is the error returned when the postprocessor is already initialized
	ErrPostprocessorAlreadyInitialized = errors.New("postprocessor already initialized")
)

Functions

func ExtractAssetsOutlinks(item *models.Item) (assets, outlinks []*models.URL, err error)

ExtractAssetsOutlinks extracts assets from the item's body and returns them. It also potentially returns outlinks if the body contains URLs that are not assets.

func Extractors

func Extractors(item *models.Item) (assets, outlinks []*models.URL, err error)

Extract assets and outlinks from the body using the appropriate extractor Order is important, we want to check for more specific things first, as they may trigger more general extractors (e.g. HTML) TODO this should be refactored using interfaces

func SanitizeAssetsOutlinks(item *models.Item, assets []*models.URL, outlinks []*models.URL, err error) ([]*models.URL, []*models.URL, error)

func Start

func Start(inputChan, outputChan chan *models.Item) error

This functions starts the preprocessor responsible for preparing the seeds sent by the reactor for captures

func Stop

func Stop()

Types

type OutlinkExtractor

type OutlinkExtractor interface {
	Support(extractor.Mode) bool // Support checks if the extractor supports the given mode
	Match(*models.URL) bool
	Extract(context.Context, *models.URL) ([]*models.URL, error)
}

Directories

Path Synopsis
Package domainscrawl is a postprocessing component that parse domains from a given input and stores them for later matching.
Package domainscrawl is a postprocessing component that parse domains from a given input and stores them for later matching.
sitespecific
ina

Jump to

Keyboard shortcuts

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