Menu

Keeping a scraper from overwriting human edits: field locks and edit history
📰

Keeping a scraper from overwriting human edits: field locks and edit history

DEV Community: database·Ali Ahmed·4 days ago
#BYGol54c
#devtodatabase#devto#dev#field#lock
Long article (815 words) — no AI summary yet.
Reading 0:00
15s threshold

A research pipeline that scrapes company websites and lets people correct the results has a simple rule to keep: people win over robots . When a person edits a field, save the change in an edit history with who made it, and add the field to the record's locked fields . When the scraper refreshes the record, it skips locked fields and writes the rest. Automated writes are recorded too, but they never lock anything, and saving a value that hasn't changed does nothing at all. In my tests that keeps a corrected website URL through every re-scrape, with the history showing exactly who changed what. One gap remains: if the scraper reads the locks, spends seconds fetching pages, then writes , a person's edit made in between is overwritten.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.