<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>197</id><slug>reading-sitemaps-to-discover-urls-part-10-197</slug><title>Reading sitemaps to discover URLs, part 10</title><excerpt>For part 10, we revisit the basics with a fresh example and a few lessons learned the hard way. Before you crawl a site link by link, check whether it already publishes a list of every page it wants…</excerpt><seriesName>Reading sitemaps to discover URLs</seriesName><seriesPart>10</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>For part 10, we revisit the basics with a fresh example and a few lessons learned the hard way. Before you crawl a site link by link, check whether it already publishes a list of every page it wants found. That list is usually called sitemap.xml.</item></paragraphs></item><item><heading>Going further</heading><paragraphs><item>Keep configuration such as base URLs, delays and selectors out of your code. Changing a delay should not require a redeploy.</item><item>Store raw responses alongside parsed output while you are developing. When a parser breaks, you can replay the saved HTML instead of hitting the site again.</item></paragraphs></item><item><heading>Step by step</heading><paragraphs><item>Write small, focused tests for your parsers using saved HTML fixtures. They run in milliseconds and catch layout changes long before a full crawl would.</item><item>Character encodings still cause trouble. Decode responses using the charset the server declares, and normalise text before comparing or storing it.</item></paragraphs></item><item><heading>Key takeaway</heading><paragraphs><item>Look for the Sitemap line in robots.txt, follow sitemap index files to their children, and use lastmod to skip pages that have not changed.</item></paragraphs></item></sections><authorId>12</authorId><authorName>Yuki Andersson</authorName><authorSlug>yuki-andersson</authorSlug><category>Scraping Basics</category><tags><item>http</item><item>json</item></tags><publishedAt>2026-05-12T00:00:00.000Z</publishedAt><wordCount>163</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
