<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>79</id><slug>structuring-a-data-extraction-pipeline-part-4-79</slug><title>Structuring a data extraction pipeline, part 4</title><excerpt>For part 4, we revisit the basics with a fresh example and a few lessons learned the hard way. A one-off script grows into a pipeline the moment someone asks for the data again next week. A little…</excerpt><seriesName>Structuring a data extraction pipeline</seriesName><seriesPart>4</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>For part 4, we revisit the basics with a fresh example and a few lessons learned the hard way. 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>Going further</heading><paragraphs><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>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>What to watch for</heading><paragraphs><item>Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.</item><item>Pagination comes in several shapes: numbered pages, next links, offsets and opaque cursors. Each has trade-offs, and a robust scraper should detect the end of the result set rather than assuming a fixed number of pages.</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>12</authorId><authorName>Yuki Andersson</authorName><authorSlug>yuki-andersson</authorSlug><category>Data Engineering</category><tags><item>http</item><item>python</item><item>javascript</item><item>scrapy</item></tags><publishedAt>2026-03-07T00:00:00.000Z</publishedAt><wordCount>174</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
