<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>81</id><slug>parsing-html-tables-with-beautifulsoup-part-5-81</slug><title>Parsing HTML tables with BeautifulSoup, part 5</title><excerpt>Part 5 looks at what changes when the same technique has to run every day in production. Tables look like the easiest thing on a page to scrape, until you meet merged cells, header rows that repeat…</excerpt><seriesName>Parsing HTML tables with BeautifulSoup</seriesName><seriesPart>5</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>Part 5 looks at what changes when the same technique has to run every day in production. Tables look like the easiest thing on a page to scrape, until you meet merged cells, header rows that repeat every twenty lines and numbers formatted for humans rather than machines.</item></paragraphs></item><item><heading>Step by step</heading><paragraphs><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>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>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>A practical approach</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>Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.</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></paragraphs></item><item><heading>Key takeaway</heading><paragraphs><item>Locate the table by a stable attribute, read the header row once, and convert every cell to a typed value before you store it.</item></paragraphs></item></sections><authorId>9</authorId><authorName>Mateo Hughes</authorName><authorSlug>mateo-hughes</authorSlug><category>Scraping Basics</category><tags><item>http</item><item>testing</item></tags><publishedAt>2025-08-31T00:00:00.000Z</publishedAt><wordCount>226</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
