Files
Tirsvad 5ac60a43fc MIL-002 scrape price (Step 1)
Delivers MIL-002 (lecture Step 1): BeautifulSoup reads the title and the price (as a float, 99.99) from the practice page. Layers: domain (Product, errors), application (ports, read_product), infrastructure (scraper, HTTP client), main as composition root. Tests use a trimmed fixture of the practice page and never the network.

Review: code against QC-PY-001 as RC-011 (Go, autonomous, not independent). 15 pytest tests, ruff and mypy --strict pass; a real run printed 99.99. Screenshots: docs/images/step-1-*.png.

Task: MIL-002#1
Task: MIL-002#2
Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
2026-10-28 14:40:33 +08:00

30 lines
1.2 KiB
HTML

<!DOCTYPE html>
<!-- Trimmed copy of https://appbrewery.github.io/instant_pot/ (markup kept, page reduced). -->
<html lang="en-us">
<head>
<title>Instant Pot - Practice Page</title>
</head>
<body>
<div id="centerCol">
<h1 id="title" class="a-size-large a-spacing-none"> <span id="productTitle"
class="a-size-large product-title-word-break"> Instant Pot Duo Plus 9-in-1
Electric Pressure Cooker, Slow Cooker, Rice Cooker, Steamer, Sauté, Yogurt
Maker, Warmer &amp; Sterilizer, Includes App With Over 800 Recipes, Stainless
Steel, 3 Quart </span> </h1>
</div>
<div data-csa-c-type="widget" data-csa-c-slot-id="apex_dp_offer_display">
<div class="a-section a-spacing-micro">
<span class="a-price aok-align-center" data-a-size="xl" data-a-color="base"><span
class="a-offscreen">$99.99</span><span aria-hidden="true"><span
class="a-price-symbol">$</span><span class="a-price-whole">99<span
class="a-price-decimal">.</span></span><span
class="a-price-fraction">99</span></span></span>
</div>
</div>
<div id="similarItems">
<span class="a-price"><span class="a-offscreen">$16.95</span></span>
<span class="a-price"><span class="a-offscreen">$116</span></span>
</div>
</body>
</html>