Scrapes any examcademy.com exam into a local Streamlit practice app.
Change one value in config.json to switch exams (DP-600, AZ-305, etc.).
Current state: DP-600 fully loaded — 178/178 questions with correct answers.
| Tool | Purpose |
|---|---|
| Python 3.11+ | runs the scraper and app |
| Microsoft Edge | authenticated browser for scraping |
| Claude Code personal subscription | analyzes image-only question answers |
pip install -r requirements.txt
playwright install msedgeconfig.json — the only file you ever change:
{
"exam_code": "dp-600"
}To switch to AZ-305: change "dp-600" to "az-305". That's it. Everything else is automatic.
Run these steps in order when scraping a new exam. For DP-600 only Step 4 and 5 are needed (Steps 1–3 are already done and image_fixups.json is committed).
python scraper.pyOpens your real Edge profile (already logged in to examcademy.com). Clicks "Show Answer" on every question, saves HTML + images to brons/.
python pipeline.pyMerges all bronze pages into silver/<exam-slug>_questions.json.
HOTSPOT and DRAG DROP questions reveal their answers as screenshots — there is no text in the HTML. Claude Code reads those images natively and writes the structured answers to image_fixups.json.
Skip this step for DP-600 —
image_fixups.jsonis already in the repo with all 58 image questions solved.
When you scrape a new exam, open Claude Code in this folder and run:
/analyze-exam-images
Claude Code reads every answer image, identifies what is selected/placed in the UI screenshot, and writes image_fixups.json. Takes about 2 minutes per exam.
Why Claude Code instead of OCR? You already have the subscription — no extra API key or cost. It reads images natively, understands dropdowns/checkboxes/drag-slots visually, and produces accurate structured answers. No Tesseract, no heavy ML packages, no slow processing.
python preload_db.pyReads the silver layer + image_fixups.json, merges them, and writes all questions to Practice Exam/exam_app.db. Prints a summary like:
Loaded 178 questions
With correct_answer: 178/178
cd "Practice Exam"
streamlit run app.pyOpen http://localhost:8501.
python switch_exam.py az-305 # switch to a different exam
python switch_exam.py dp-600 # re-scrape the current exam from scratchUpdates config.json, wipes stale brons/ and silver/ data, and prints the next steps.
Works for both switching to a new exam and forcing a clean re-scrape of the current one.
Then run Steps 1–4 as usual. The app detects the exam change and clears the old question bank automatically.
config.json ← exam settings (gitignored)
config.example.json ← template
switch_exam.py ← switches to a new exam (updates config, wipes stale data)
image_fixups.json ← image-question answers (written by /analyze-exam-images)
brons/
raw/page_N.html ← saved raw HTML per page
page_N.json ← parsed questions per page
images/ ← downloaded question and answer images
silver/
<exam-slug>_questions.json
Practice Exam/
app.py ← Streamlit practice app
exam_app.db ← SQLite session/answer store (gitignored)