All tests / Hidden data
JSON in a script tag
What this tests. Twenty product pages that show a name and "Price loading…". The price, stock and variants sit in a JSON script tag the visible HTML never repeats.
The rule. Each product page shows its name and a price that says it's still loading. The real record is in
<script type="application/json" id="__PAGE_DATA__">: price, stock count, SKU and every variant. Parse that
and you have the lot, no browser needed. Scrape the visible text and you get twenty names and no prices.
- Easy
- HTTP only
- Answer key
/hidden/json/answers.json
- Thistlecombe Soft Plush Whale
- Saltgrove Woven Plush Owl
- Kestleford Soft Plush Bear
- Upwold Slim Plush Bear
- Saltgrove Square Plush Bear
- Kestleford Woven Plush Whale
- Saltgrove Square Plush Whale
- Orrin Lane Studio Plush Bear
- Fennick & Daw Woven Plush Owl
- Pellwick Square Plush Bear
- Ardley Fen Heavy-duty Plush Bear
- Hollinsgate Heavy-duty Plush Bear
- Quillmere Studio Plush Whale
- Fennick & Daw Round Plush Fox
- Hollinsgate Woven Plush Fox
- Fennick & Daw Twin Plush Fox
- Vexmoor Soft Plush Owl
- Upwold Mini Plush Whale
- Marrowdene Round Plush Bear
- Ardley Fen Tall Plush Bear
Data version 1.0.0. Everything here is made up: products, brands, people, towns. tests.json · robots.txt · Source