runWithActionHooks (crawler/hooks.go)

katana · pkg/engine/headless/crawler/hooks.go · go · MIT
scraping, Scraping / Crawling

Module exposing: runWithActionHooks, runWithNavigateBackHook, Hooks

// Source: https://github.com/projectdiscovery/katana | License: MIT | Copyright 2022 ProjectDiscovery
// Provided via justclaw.it.com; keep this notice with the code.
package crawler

import (
	"github.com/projectdiscovery/katana/pkg/engine/headless/browser"
	"github.com/projectdiscovery/katana/pkg/engine/headless/types"
)

// Hooks bundles optional lifecycle callbacks invoked by the headless crawler.
// All fields are optional; nil callbacks are skipped.
//
// Callbacks run synchronously on the crawler's own goroutine and block its
// progress for their duration — they should return quickly. A non-nil error
// returned from any callback aborts the surrounding crawl step and is
// propagated back to the caller of Crawl.
//
// A Hooks value is consulted on every action; callers may safely 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key