Save scraped rows to Postgres without duplicates
A Python pattern for idempotent upserts on a natural key, with change tracking, using psycopg.
Read the tutorialPublic web data · any country · any language · 28 countries mapped
Tutorials
Tables, not selectors. These are the four operations that turn a scraped export into something a database or a dashboard can trust — written by the people who run the pipelines.
The set
No install fluff, no “hello world”. Each one solves the part that breaks in production.
A Python pattern for idempotent upserts on a natural key, with change tracking, using psycopg.
Read the tutorialParse prices, normalise whitespace, drop duplicates on a key and report fill rates — the four steps that make scraped data usable.
Read the tutorialHMAC verification with timingSafeEqual, timestamp replay protection and the three mistakes that make the check useless.
Read the tutorialThe honest limit
These tutorials get you to a working table. The cost arrives later: markup drifts, rendering is expensive, and someone has to notice before a dashboard shows a wrong number.
Related
100-row sample, masked where needed, with the source URL on every row. Written quote within 24 hours.
We use cookies for analytics only. Essential cookies keep the site working — nothing is loaded before you choose.