A CLI tool to download videos and transcripts from your edX courses.
v2.0 is a complete rewrite. It uses the official edX mobile API instead of HTML scraping, making it faster, more reliable, and capable of downloading transcripts in any language. See the v1 branch for the legacy version.
pip install edx-downloaderOr install from source:
git clone https://github.com/rehmatworks/edx-downloader.git
cd edx-downloader
pip install .To also download YouTube-hosted videos (some courses use them):
pip install "edx-downloader[youtube]"# 1. Log in (you'll be prompted for credentials)
edx-dl login
# 2. List your enrolled courses
edx-dl courses
# 3. Download a course
edx-dl download "course-v1:HarvardX+CS50+X"Authenticate with edX. Your JWT token is saved to ~/.edx-dl/config.json
and refreshed automatically when it expires.
edx-dl login
# Email: you@example.com
# Password: ****List all courses you are enrolled in, showing Course IDs you can use with the download command.
edx-dl coursesDownload all videos and transcripts for a course.
# By course ID
edx-dl download "course-v1:HarvardX+CS50+X"
# By full URL
edx-dl download "https://courses.edx.org/courses/course-v1:HarvardX+CS50+X/course/"| Flag | Default | Description |
|---|---|---|
-o, --output |
./downloads |
Output directory |
-q, --quality |
high |
Video quality: high (720p) or medium (360p) |
-s, --subs |
en |
Transcript languages (comma-separated, or all) |
# Download with English + Spanish subtitles to a custom folder
edx-dl download "course-v1:HarvardX+CS50+X" -s "en,es" -o ~/courses
# Download all available transcript languages at 360p
edx-dl download "course-v1:HarvardX+CS50+X" -q medium -s all
# Resume an interrupted download (already-downloaded files are skipped)
edx-dl download "course-v1:HarvardX+CS50+X"downloads/
└── CS50s Introduction to Computer Science/
├── 01 - Week 0/
│ ├── 01 - Lecture/
│ │ ├── 01 - Introduction.mp4
│ │ ├── 01 - Introduction [en].srt
│ │ └── 01 - Introduction [es].srt
│ └── 02 - Problem Set/
│ └── ...
└── 02 - Week 1/
└── ...
- Fast: Single API call retrieves the entire course structure (no HTML scraping)
- Reliable: Uses the stable edX mobile API with JWT authentication
- Transcripts: Download subtitles in any available language
- Quality choice: Pick between 720p and 360p MP4 downloads
- Resume support: Re-run the same command to skip already-downloaded files
- YouTube fallback: Automatically uses
yt-dlpfor YouTube-hosted videos (if installed) - Auto token refresh: JWT tokens are refreshed automatically, even during long downloads
- Smart naming: Falls back to section names when video blocks have generic titles
- Python 3.10+
- An edX account enrolled in the course(s) you want to download
This tool is intended to help learners download course videos for offline study. Do not use it to redistribute copyrighted content. You are responsible for complying with edX's terms of service.
MIT