Skip to main content

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

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

edx_downloader-2.0.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edx_downloader-2.0.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

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

Hashes for edx_downloader-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1daf35597bd753c79c5df1b2489b604af2a335fedbba5a707fea08f7f7e4f7dc
MD5 391b9f2d4e0fcd1d27528495f4cc46ce
BLAKE2b-256 c4388c627182afe800c1da38edba6efd67642349695de031eb5e7d84a1545ce5

See more details on using hashes here.

Provenance

The following attestation bundles were made for edx_downloader-2.0.0.tar.gz:

Publisher: publish.yml on rehmatworks/edx-downloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for edx_downloader-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57f2863d32052867b9f09074f0d8778e255d18131d33c5f349d7096fdbe1767f
MD5 55635127f37ec15e757a0236995f4a7f
BLAKE2b-256 0011acedd662009b0c9374a3e0af188512744524e6ffcab1b6ed6807653c2dfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for edx_downloader-2.0.0-py3-none-any.whl:

Publisher: publish.yml on rehmatworks/edx-downloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page