discoverroute

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 16 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

This section is empty.

Functions

func ExtractAnchorRoutes

func ExtractAnchorRoutes(doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractAnchorRoutes extracts WebRoutes from anchor (<a>) elements in the HTML document. Returns a slice of RouteDetails, a slice of URLs, and a slice of errors.

func ExtractFormRoutes

func ExtractFormRoutes(doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractFormRoutes extracts WebRoutes from form elements in the HTML document It returns a slice of WebRoutes, a slice of URLs and a slice of errors ExtractFormRoutes extracts WebRoutes from form elements in the HTML document It returns a slice of WebRoutes, a slice of URLs and a slice of errors WebRoutes are merged to only return unique routes

func ExtractLinkRoutes

func ExtractLinkRoutes(doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractLinkRoutes extracts WebRoutes from link (<link>) elements in the HTML document. Returns a slice of RouteDetails, a slice of URLs, and a slice of errors.

func ExtractNetworkRoutes

func ExtractNetworkRoutes(ctx context.Context, browser *headless.Requester, target string, scopeURL string, ignoreCrossDomainRoutes bool, ignoreCrossDomainStaticAssets bool, captureStaticAssets bool, verifyTLS bool) ([]*discover.RouteDetails, []string, []string)

ExtractNetworkRoutes uses a headless browser to capture network requests and extract route details from them. target is the page to navigate to (the per-page post-redirect URL); scopeURL is the scope anchor (config.Target) used to keep discovery tight to the original target. ignoreCrossDomainRoutes gates the scope of discovered routes; ignoreCrossDomainStaticAssets gates the scope of captured static assets — matching the HTML/JS extractors. Returns a slice of RouteDetails, a slice of URLs (static assets), and a slice of errors.

func ExtractScriptAssets added in v0.27.0

func ExtractScriptAssets(doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]string, []string)

ExtractScriptAssets records the JavaScript bundles a document references, so they are reported as static assets rather than mined here. Returns a slice of URLs and a slice of errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

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