When Retailers Redesign Their Pages: Keeping a Price Tracker Alive Through Layout Changes
A price tracker that breaks every time a store changes its HTML is not a tracker β it is a pager. Here is how to build one that survives redesigns.
Every deal site learns the same lesson eventually: the retailer page you scrape today will not look the same next quarter. Amazon, Walmart, and Best Buy all redesign product pages regularly β a price moves from one <span> to another, a new layout rolls out to half of all visitors, and a crawler that worked yesterday starts returning nothing. At Savlume we track prices across five stores, so a single silent break can poison a whole guide. This is how we think about surviving layout changes.
1. Extract by meaning, not by markup
The most common mistake is writing a selector that says "the price is the third <span> inside the div with class a-price ." That selector encodes the page's current design, not the price's meaning.β¦