<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>123</id><slug>respecting-robots-txt-in-practice-part-7-123</slug><title>Respecting robots.txt in practice, part 7</title><excerpt>Part 7 looks at what changes when the same technique has to run every day in production. robots.txt is a short text file with a long history. It tells automated clients which parts of a site the…</excerpt><seriesName>Respecting robots.txt in practice</seriesName><seriesPart>7</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>Part 7 looks at what changes when the same technique has to run every day in production. 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>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>Deduplicate as you go. The same item often appears on several listing pages, and a stable identifier such as a SKU or ID makes duplicates easy to spot.</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>Character encodings still cause trouble. Decode responses using the charset the server declares, and normalise text before comparing or storing it.</item><item>Read the site's terms of service before you start. Many sites welcome automated access within limits and say so explicitly; others ask you to use an API instead.</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>3</authorId><authorName>Priya Nakamura</authorName><authorSlug>priya-nakamura</authorSlug><category>Ethics &amp; Law</category><tags><item>python</item><item>selenium</item><item>playwright</item></tags><publishedAt>2024-07-03T00:00:00.000Z</publishedAt><wordCount>208</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
