<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>3</id><slug>respecting-robots-txt-in-practice-3</slug><title>Respecting robots.txt in practice</title><excerpt>robots.txt is a short text file with a long history. It tells automated clients which parts of a site the operator would prefer they left alone, and how quickly they should crawl the rest.</excerpt><seriesName>Respecting robots.txt in practice</seriesName><seriesPart>1</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>robots.txt is a short text file with a long history. It tells automated clients which parts of a site the operator would prefer they left alone, and how quickly they should crawl the rest.</item></paragraphs></item><item><heading>Putting it into practice</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>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>Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.</item></paragraphs></item><item><heading>What to watch for</heading><paragraphs><item>Validate the data you extract. Prices without currencies, dates without time zones and empty fields are common sources of silent errors downstream.</item><item>Always identify your client honestly with a descriptive User-Agent, and keep your request rate modest. A crawler that behaves like a considerate visitor is far less likely to cause problems for the site operator.</item><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></paragraphs></item><item><heading>Key takeaway</heading><paragraphs><item>Fetch robots.txt before you crawl, honour Disallow rules and Crawl-delay values, and re-check it periodically because sites change their policies.</item></paragraphs></item></sections><authorId>2</authorId><authorName>Noah Bennett</authorName><authorSlug>noah-bennett</authorSlug><category>Ethics &amp; Law</category><tags><item>python</item><item>json</item><item>scrapy</item><item>playwright</item></tags><publishedAt>2026-09-10T00:00:00.000Z</publishedAt><wordCount>195</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
