Files
Tirsvad 7d139f86c7 MIL-006 wiki in three languages
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
2026-10-28 14:50:58 +08:00

1.2 KiB

Step 3: request headers

🌐 English · Dansk · Bahasa Melayu

Assignment. Send browser-like headers with the request: at least User-Agent and Accept-Language.

What we built. DEFAULT_HEADERS in constants.py (without Host and X-Amzn-Trace-Id) and RequestsPageFetcher, which passes them as headers= to requests.get.

What a browser sends to httpbin.org/headers, and what the bot sends (Host is added by requests):

Headers sent by a browser

Headers sent by the bot

What we gained

  • A request carries more than the URL: the browser, the system and the language travel in headers.
  • With the right headers a server can answer in your language and currency.
  • A script without headers looks like a bot, and many servers block bots.
  • One read-only definition of the headers, and tests that check what is sent.