-
Notifications
You must be signed in to change notification settings - Fork 136
Crawl
Polite, single-process, Nutch-shaped loop. Not a Spark job.
-
inject — seeds become
UNFETCHEDat depth 0. -
generate — take up to
topnUNFETCHED URLs, fair across hosts, sortpage_score desc, discover_depth asc. With same host, only seed hosts (wwwand apex). With a max depth, onlydiscover_depth <= depth. -
fetch — httpx,
User-Agent: Sparkler/1.0, robots.txt, 1s delay per apex host. -
parse — Tika for text and metadata; HTML
hreffor outlinks. Junktel:/ phone-as-port hrefs are skipped. -
filter —
conf/regex-urlfilter.txt(skip images, scripts, mailto, PDFs by default). Same-host if requested. - upsert — FETCHED page + new UNFETCHED outlinks at depth+1.
- same-host finish — leftover UNFETCHED URLs that are not on a seed host are marked FILTERED so the frontier can go to 0.
One iteration is one generate+fetch batch (UI default 50 URLs). That is why a first click can show 1 fetched and dozens waiting. until done / -i -1 keeps going until generate returns nothing.
bin/sparkler inject -id mai -su 'https://mattmann.ai/'
bin/sparkler crawl -id mai --same-host -i -1www.mattmann.ai counts as mattmann.ai. http:// and https://www. of the same path are still two catalog rows (canonical collapse is not in v1).
Blog ?e-page= pagination increments discover_depth each hop. The Stats heatmap bins deep pages as 16+; the Solr field still has the raw depth.
Add those URLs as seeds, keep same host on, until done.
Or uncheck same host and set depth to 2 or 3. Depth unlimited with same host off will wander.
conf/sparkler.yaml — Solr host/port/core, serve bind, delay, timeout, user-agent, robots, default same-host.
conf/regex-urlfilter.txt — Nutch-style + / - rules.
Inspired by USC IRDS Sparkler.
Old (2016–2023)