spyweb lets you customize every stage of the scraping pipeline with Lua scripts (Luau dialect). Place a hooks.lua alongside your job's config.toml and define any combination of 6 hook functions.
config.toml.
Key Rules
- Return the value (modified or not) to continue the pipeline
- Return
nilorfalseto drop/skip (behavior varies per hook) - Lua globals persist across runs — useful for pagination counters
- Hot-reload creates a fresh Lua VM and resets all state
- Hook errors are logged and skipped — they never crash the job