"Because clicking through 47 tiny units isn't learning—it's a workout for your mouse finger."
It’s 2 AM. Your Azure AI-103 exam is in three days. You’re on Microsoft Learn, clicking through 12 modules full of tiny units—each a separate page. Tabs pile up, progress vanishes, and that paragraph you read yesterday? Lost somewhere between Computer Vision and NLP.
Microsoft Learn is great for bite-sized, month-long strolls. For actual studying, searching, or offline reading it’s a click-maze designed by a button enthusiast.
So I built a tool that stitches all those scattered micro-units into a single, searchable HTML or PDF file per module—all the content, zero clicking, fully offline.
Now go pass that exam.
Microsoft Courses Downloader is a Python tool that extracts content from each module’s mini‑site in Microsoft Learn courses and turns it into clearly organized documents—one document per module.
- Course Extraction: Fetches learning paths and modules from any Microsoft Learn course URL
- Learning Path Extraction: Process any Microsoft Learn learning path URL directly
- Module Extraction: Process any Microsoft Learn module URL directly
- Catalog API Integration: Uses the official Microsoft Learn Catalog API for accurate course structure
- Content Processing: Extracts and cleans main content from course pages
- HTML Generation: Creates beautifully formatted, combined HTML files for each module
- PDF Conversion: Converts HTML files to PDF using Playwright
- Organized Output: Generates structured output with numbered directories and files
- Python 3.10 or higher - Download Python
git clone https://github.com/MidnightFlux/microsoft-courses-downloader.git
cd microsoft-courses-downloaderCreating a virtual environment keeps dependencies isolated from your system Python.
# Create virtual environment
python -m venv .venv
# Activate virtual environment
.venv\Scripts\Activate.ps1Note: If you get an execution policy error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Create virtual environment
python -m venv .venv
# Activate virtual environment
.venv\Scripts\activate.bat# Create virtual environment
python3 -m venv .venv
# Activate virtual environment
source .venv/bin/activateWith the virtual environment activated (you should see (.venv) in your prompt):
pip install -r requirements.txtPlaywright requires browser binaries for PDF generation:
Linux users: Run this command first to install system dependencies:
playwright install-deps
playwright install chromium-
Activate your virtual environment (if not already active):
- Windows:
.venv\Scripts\Activate.ps1(oractivate.bat) - macOS/Linux:
source .venv/bin/activate
- Windows:
-
Run the script:
python main.py
-
Enter a URL when prompted. The tool accepts three types of Microsoft Learn URLs:
URL Type Example Behavior Course .../courses/ai-103t00Extracts all learning paths and their modules Learning Path .../training/paths/develop-generative-ai-apps/Extracts all modules in that learning path Module .../training/modules/prepare-azure-ai-development/Extracts all units in that single module Press Enter to use the default course URL (AI-103T00):
Enter a Microsoft Learn course, learning path, or module URL Course URL example: https://learn.microsoft.com/en-us/training/courses/ai-103t00 Learning path URL example: https://learn.microsoft.com/en-us/training/paths/develop-generative-ai-apps/ Module URL example: https://learn.microsoft.com/en-us/training/modules/prepare-azure-ai-development/ (press Enter to use default course URL: https://learn.microsoft.com/en-us/training/courses/ai-103t00): >
Browse all available Microsoft Learn courses at:
https://learn.microsoft.com/en-us/training/browse/?resource_type=course
Copy any course, learning path, or module URL and paste it when prompted.
- Course URL →
output/course-name/01-learning-path-name/01-module-name.pdf - Learning Path URL →
output/learning-path-name/01-module-name.pdf - Module URL →
output/module-name/01-module-name.pdf
output/
├── course-title/
│ ├── 01-learning-path-name/
│ │ ├── 01-module-name.html
│ │ ├── 01-module-name.pdf
│ │ ├── 02-module-name.html
│ │ └── 02-module-name.pdf
│ ├── 02-learning-path-name/
│ │ ├── 01-module-name.html
│ │ ├── 01-module-name.pdf
│ │ └── ...
│ └── ...
└── ...
Want to supercharge your learning? Upload the generated PDFs to Google NotebookLM!
NotebookLM is an AI-powered research assistant that can:
- 🎙️ Generate Podcasts - Create AI-generated audio summaries you can listen to on the go
- ❓ Create Quizzes - Generate practice questions to test your understanding
- 🃏 Build Flashcards - Make study cards for quick review sessions
- 💬 Answer Questions - Ask questions about the course content and get instant answers
- 🔗 Connect Ideas - Discover relationships between different concepts in the material
Simply upload the PDF files generated by this tool to NotebookLM, and start exploring your course content in new, interactive ways!
- URL Detection: The script detects whether you provided a course, learning path, or module URL
- Catalog Fetching: Fetches data from the Microsoft Learn Catalog API
- Learning Path Discovery (course URLs only): Extracts all learning paths associated with the course
- Module Discovery (course/learning path URLs): Resolves all modules for each learning path
- Unit Extraction: Fetches all unit links within each module
- HTML Generation: Combines all units into a single, styled HTML file per module
- PDF Conversion: Uses Playwright to convert HTML files to PDF format
Default constants can be modified in main.py:
DEFAULT_COURSE_URL = "https://learn.microsoft.com/en-us/training/courses/ai-103t00"
DEFAULT_LEARNING_PATH_URL = "https://learn.microsoft.com/en-us/training/paths/develop-generative-ai-apps/"
DEFAULT_MODULE_URL = "https://learn.microsoft.com/en-us/training/modules/prepare-azure-ai-development/"
OUTPUT_BASE_DIR = "output"
PAGE_TITLE_IGNORE = ("Knowledge check", "Module assessment", "Exercise - ")- Python 3.10+
- requests
- beautifulsoup4
- playwright
MIT License
