<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>157</id><slug>reading-sitemaps-to-discover-urls-part-8-157</slug><title>Reading sitemaps to discover URLs, part 8</title><excerpt>In part 8 we take the ideas from earlier instalments and apply them to a larger, messier site. 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>8</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>In part 8 we take the ideas from earlier instalments and apply them to a larger, messier site. 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>Putting it into practice</heading><paragraphs><item>Treat HTTP 429 responses as a signal, not an obstacle. Read the Retry-After header, back off, and resume at a slower pace.</item><item>Selectors are the most fragile part of any scraper. Prefer stable attributes such as data-testid or semantic structure over generated class names, which can change on every deploy.</item></paragraphs></item><item><heading>Common pitfalls</heading><paragraphs><item>Character encodings still cause trouble. Decode responses using the charset the server declares, and normalise text before comparing or storing it.</item><item>Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.</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>3</authorId><authorName>Priya Nakamura</authorName><authorSlug>priya-nakamura</authorSlug><category>Scraping Basics</category><tags><item>python</item><item>http</item><item>javascript</item><item>ethics</item></tags><publishedAt>2026-04-06T00:00:00.000Z</publishedAt><wordCount>157</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
