Delivers MIL-006 tasks 1 to 4: the wiki pages in `docs/wiki/` in English, Danish and Bahasa Malaysia (Home plus one page per lecture step, each with its screenshot and a "what we gained" section, and a shared `_Sidebar.md`), laid out as `framework/process/wiki.md` says (English without suffix, `-da` and `-ms` for the others, a language line on every page). The README links to the wiki. Checked: the three languages have the same five pages; every page starts with the language line; code, commands and file names stay in English. There is no QC checklist for wiki pages, so there is no RC record. Publishing to the host's wiki (task 5, issue #31) follows after this merge. Task: MIL-006#1 Task: MIL-006#2 Task: MIL-006#3 Task: MIL-006#4
1.2 KiB
1.2 KiB
Step 1: scrape the price
🌐 English · Dansk · Bahasa Melayu
Assignment. Use BeautifulSoup to get the price of the Instant Pot on the practice page as a floating point number and print it.
What we built. get_title(html) and get_price(html) in infrastructure/scraper.py. The price is in the first element with class a-offscreen; its text is $99.99. split("$") drops the currency sign and float() makes the number.
What we gained
- How to find an element in the browser's inspector and select it with BeautifulSoup (
select_one). - How to clean scraped text (
strip,split) before converting it withfloat(). - Tests that use a saved copy of the page, so they run without the network.
- A clear error (
PriceNotFoundError) when the element is missing.