Summary
SitemapCrawler discovers the candidate URLs of a website source by reading its sitemap index and child sitemaps via Spring RestClient, collecting every <loc> + <lastmod>, and filtering against the source's Ant-glob urlInclude/urlExclude (spec 002). When a source has no sitemap, it falls back to a bounded link-following crawl from baseUrl. Output: DiscoveredItem(url, lastmod) for the fetch stage.
Spec
- Spec folder:
docs/specs/004-sitemap-crawler/
- Design:
docs/specs/004-sitemap-crawler/design.md
- Behaviors:
docs/specs/004-sitemap-crawler/behaviors.md
Acceptance criteria (from behaviors.md)
Notes
- Roadmap Phase 1 step 4; design doc §5.1, §6. Builds on spec 002 (UrlMatcher).
Summary
SitemapCrawlerdiscovers the candidate URLs of awebsitesource by reading its sitemap index and child sitemaps via SpringRestClient, collecting every<loc>+<lastmod>, and filtering against the source's Ant-globurlInclude/urlExclude(spec 002). When a source has no sitemap, it falls back to a bounded link-following crawl frombaseUrl. Output:DiscoveredItem(url, lastmod)for the fetch stage.Spec
docs/specs/004-sitemap-crawler/docs/specs/004-sitemap-crawler/design.mddocs/specs/004-sitemap-crawler/behaviors.mdAcceptance criteria (from behaviors.md)
<urlset>collected into DiscoveredItems (url + lastmod)<sitemapindex>followed recursively; union of children returned<lastmod>→ null (tolerated)urlIncludeURLs returned;urlExcludeURLs droppedNotes