Tech
Half the web already hands you clean product data. You just have to ask.
I once spent an afternoon writing selectors to pull a price off a product page. Wrote the CSS path, handled the currency symbol, dealt with the sale-price-versus-list-price mess, tested it across a dozen listings. Then I opened view-source, scrolled a bit, and found the same price sitting in a <script type="application/ld+json"> block, typed, labeled, and currency-tagged. The retailer had published it there on purpose. I'd done a morning's work to reconstruct data that was already handed...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to