<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>99</id><slug>structuring-a-data-extraction-pipeline-part-5-99</slug><title>Structuring a data extraction pipeline, part 5</title><excerpt>This is part 5 of our series, and this time we focus on edge cases readers asked about. A one-off script grows into a pipeline the moment someone asks for the data again next week. A little structure…</excerpt><seriesName>Structuring a data extraction pipeline</seriesName><seriesPart>5</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>This is part 5 of our series, and this time we focus on edge cases readers asked about. A one-off script grows into a pipeline the moment someone asks for the data again next week. A little structure early on saves a rewrite later.</item></paragraphs></item><item><heading>What to watch for</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>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>Putting it into practice</heading><paragraphs><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><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></paragraphs></item><item><heading>Key takeaway</heading><paragraphs><item>Separate fetching, parsing and storing into stages, keep raw responses, make each stage re-runnable, and validate records before they reach storage.</item></paragraphs></item></sections><authorId>2</authorId><authorName>Noah Bennett</authorName><authorSlug>noah-bennett</authorSlug><category>Data Engineering</category><tags><item>playwright</item><item>json</item><item>http</item><item>ethics</item></tags><publishedAt>2025-07-20T00:00:00.000Z</publishedAt><wordCount>176</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
