CSS selectors against a rendered product page are a trap. They look fine until marketing ships a redesign on a Tuesday and your div.price__amount--v2 returns null for every SKU. Then you're spinning up a headless browser just to read a number that was in the HTTP response the whole time.

Here's the thing I wish someone had told me three storefronts ago: the product data is almost always already JSON, sitting right there in the page. You don't parse it out of the DOM. You pluck it out of a script tag or an XHR. I've built scrapers for a couple dozen retailers now, and I reach for selectors maybe once a year.

Three places to look, best first.

JSON-LD, the one retailers hand you on purpose

Retailers want Google's rich results, so they embed schema.org/Product markup. That's a <script type="application/ld+json"> block with price, currency, availability, sometimes a GTIN — a documented shape you can rely on across completely unrelated sites.