CLI tool to download videos and transcripts from edX courses.
Project description
edx-downloader
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.
Installation
pip install edx-downloader
Or 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]"
Quick Start
# 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"
Commands
edx-dl login
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: ****
edx-dl courses
List all courses you are enrolled in, showing Course IDs you can use with the download command.
edx-dl courses
edx-dl download
Download 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/"
Options
| 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) |
Examples
# 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"
Output Structure
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/
└── ...
Features
- 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
Requirements
- Python 3.10+
- An edX account enrolled in the course(s) you want to download
Disclaimer
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.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edx_downloader-2.0.0.tar.gz.
File metadata
- Download URL: edx_downloader-2.0.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1daf35597bd753c79c5df1b2489b604af2a335fedbba5a707fea08f7f7e4f7dc
|
|
| MD5 |
391b9f2d4e0fcd1d27528495f4cc46ce
|
|
| BLAKE2b-256 |
c4388c627182afe800c1da38edba6efd67642349695de031eb5e7d84a1545ce5
|
Provenance
The following attestation bundles were made for edx_downloader-2.0.0.tar.gz:
Publisher:
publish.yml on rehmatworks/edx-downloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edx_downloader-2.0.0.tar.gz -
Subject digest:
1daf35597bd753c79c5df1b2489b604af2a335fedbba5a707fea08f7f7e4f7dc - Sigstore transparency entry: 1040635915
- Sigstore integration time:
-
Permalink:
rehmatworks/edx-downloader@30aae7b77db6253022934cbbc6e7b76e73eb437b -
Branch / Tag:
refs/tags/v2.0 - Owner: https://github.com/rehmatworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@30aae7b77db6253022934cbbc6e7b76e73eb437b -
Trigger Event:
push
-
Statement type:
File details
Details for the file edx_downloader-2.0.0-py3-none-any.whl.
File metadata
- Download URL: edx_downloader-2.0.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f2863d32052867b9f09074f0d8778e255d18131d33c5f349d7096fdbe1767f
|
|
| MD5 |
55635127f37ec15e757a0236995f4a7f
|
|
| BLAKE2b-256 |
0011acedd662009b0c9374a3e0af188512744524e6ffcab1b6ed6807653c2dfc
|
Provenance
The following attestation bundles were made for edx_downloader-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on rehmatworks/edx-downloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edx_downloader-2.0.0-py3-none-any.whl -
Subject digest:
57f2863d32052867b9f09074f0d8778e255d18131d33c5f349d7096fdbe1767f - Sigstore transparency entry: 1040635996
- Sigstore integration time:
-
Permalink:
rehmatworks/edx-downloader@30aae7b77db6253022934cbbc6e7b76e73eb437b -
Branch / Tag:
refs/tags/v2.0 - Owner: https://github.com/rehmatworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@30aae7b77db6253022934cbbc6e7b76e73eb437b -
Trigger Event:
push
-
Statement type: