Skip to main content

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-dlp for 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

Metadata

Release files for edx-downloader 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edx-downloader 2.0.0
File Size Uploaded Provenance Actions
edx_downloader-2.0.0.tar.gz 11.9 kB With provenance Details for edx_downloader-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for edx-downloader 2.0.0
File Interpreter ABI Platform Actions
edx_downloader-2.0.0-py3-none-any.whl Python 3 none any Details for edx_downloader-2.0.0-py3-none-any.whl

Total release size: 23.4 kB

Release files / edx_downloader-2.0.0.tar.gz

Download URL edx_downloader-2.0.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1daf35597bd753c79c5df1b2489b604af2a335fedbba5a707fea08f7f7e4f7dc
BLAKE2b-256 checksum
How to use checksums
c4388c627182afe800c1da38edba6efd67642349695de031eb5e7d84a1545ce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Release files / edx_downloader-2.0.0-py3-none-any.whl

Download URL edx_downloader-2.0.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57f2863d32052867b9f09074f0d8778e255d18131d33c5f349d7096fdbe1767f
BLAKE2b-256 checksum
How to use checksums
0011acedd662009b0c9374a3e0af188512744524e6ffcab1b6ed6807653c2dfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Security for edx-downloader 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for edx_downloader-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page