4 Commits
Author SHA1 Message Date
Tirsvad 34e70b31dc MIL-005 live Amazon page (Step 4)
Delivers MIL-005 (lecture Step 4): the product URL comes from `PRODUCT_URL` (default: the lecture's Amazon page), price and title selectors and robot-check markers live in `constants.py`, and a robot-check page raises `RobotCheckError` with a clear message. The code does not try to solve or bypass the check.

Outcome on the live page (2026-10-28): Amazon returned HTTP 200 with a robot-check page and no price; the page is kept (tokens redacted) as a test fixture and shown in the README. Two live requests were made in total, one to inspect the response and one for the screenshot; there are no retries or loops.

Review: code against QC-PY-001 as RC-014 (Go, autonomous, not independent). 56 pytest tests (no network), ruff and mypy --strict pass.

Task: MIL-005#1
Task: MIL-005#2
Task: MIL-005#3
Task: MIL-005#4
Task: MIL-005#5
2026-10-28 14:48:21 +08:00
Tirsvad ec6ed213fb MIL-004 request headers (Step 3)
Delivers MIL-004 (lecture Step 3): `DEFAULT_HEADERS` (User-Agent, Accept-Language, Accept, Accept-Encoding, Sec-Fetch-*, Priority, Upgrade-Insecure-Requests; no Host and no X-Amzn-Trace-Id) is defined once in `constants.py` and sent by `RequestsPageFetcher`. Tests assert the headers, the absence of Host/trace id, the timeout and read-only behaviour, with no network.

Review: code against QC-PY-001 as RC-013 (Go, autonomous, not independent). 38 pytest tests, ruff and mypy --strict pass. Screenshots compare the browser's headers and the bot's headers at httpbin.org/headers.

Task: MIL-004#1
Task: MIL-004#2
Task: MIL-004#3
Task: MIL-004#4
2026-10-28 14:45:46 +08:00
Tirsvad 07b46f0180 MIL-003 e-mail alert (Step 2)
Delivers MIL-003 (lecture Step 2): an alert e-mail with title, price and buy link is sent over SMTP (port 587, STARTTLS) when the price is below the target 100. SMTP address, e-mail address and password are read from `.env` with python-dotenv (`.env.example` lists them). Tests use fakes and never open a network or SMTP connection.

Review: code against QC-PY-001 as RC-012 (Go, autonomous, not independent). 33 pytest tests, ruff and mypy --strict pass. The Step 2 screenshots come from a run with a stubbed SMTP connection; no real mail was sent.

Task: MIL-003#1
Task: MIL-003#2
Task: MIL-003#3
Task: MIL-003#4
Task: MIL-003#5
2026-10-28 14:44:18 +08:00
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