Skip to main content

CLI tool to extract Coursera course transcripts/subtitles

Project description

๐Ÿ“š Coursera Transcript Generator

A beautiful CLI tool to bulk-download transcripts and subtitles from any Coursera course you're enrolled in.

CLI Preview

Python License


โœจ Features

  • Interactive prompts โ€” guided step-by-step experience, no need to memorize flags
  • Bulk download โ€” grabs every lecture transcript in a course at once
  • Organized output โ€” files are neatly sorted into module folders
  • Progress tracking โ€” real-time progress bar with download status
  • Retry logic โ€” automatic retries with exponential backoff on failures
  • Multiple formats โ€” supports both .txt (plain text) and .srt (subtitle) formats
  • Multi-language โ€” download transcripts in any available language

๐Ÿ“ฆ Installation

# Clone the repo
git clone https://github.com/your-username/coursera-transcript-generator.git
cd coursera-transcript-generator

# Install in editable mode
pip install -e .

๐Ÿš€ Usage

Interactive Mode (recommended)

Just run the command with no arguments โ€” it will guide you through everything:

coursera-transcripts

You'll be prompted for:

  1. CAUTH cookie โ€” your Coursera authentication token
  2. Course slug โ€” the identifier from the course URL
  3. Options โ€” language, format, and output directory

CLI Mode

Pass everything as flags for scripting / automation:

coursera-transcripts \
  --cookie "YOUR_CAUTH_VALUE" \
  --slug "machine-learning" \
  --language en \
  --format txt \
  --output ./transcripts

All Options

Flag Short Default Description
--cookie -c (prompted) CAUTH cookie value
--slug -s (prompted) Course slug from URL
--language -l en Subtitle language code
--format txt Output format (txt or srt)
--output -o ./output Parent output directory

๐Ÿ”‘ Getting Your CAUTH Cookie

  1. Open coursera.org and log in
  2. Open DevTools (F12 or Ctrl+Shift+I)
  3. Go to Application โ†’ Cookies โ†’ https://www.coursera.org
  4. Find the cookie named CAUTH
  5. Copy its Value

[!IMPORTANT] You must be enrolled in the course to download its transcripts.


๐Ÿ“ Output Structure

Transcripts are organized by module:

output/
โ””โ”€โ”€ machine-learning/
    โ”œโ”€โ”€ introduction-to-ml/
    โ”‚   โ”œโ”€โ”€ Welcome to Machine Learning.txt
    โ”‚   โ”œโ”€โ”€ What is Machine Learning.txt
    โ”‚   โ””โ”€โ”€ Supervised Learning.txt
    โ”œโ”€โ”€ linear-regression/
    โ”‚   โ”œโ”€โ”€ Model Representation.txt
    โ”‚   โ””โ”€โ”€ Cost Function.txt
    โ””โ”€โ”€ ...

๐Ÿ”ง Finding the Course Slug

The slug is the part of the URL after /learn/:

https://www.coursera.org/learn/machine-learning
                                โ””โ”€โ”€ this is the slug

๐Ÿ“‹ Requirements

  • Python 3.10+
  • A Coursera account with enrollment in the target course

๐Ÿ“„ 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

coursera_transcripts-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

coursera_transcripts-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file coursera_transcripts-0.1.0.tar.gz.

File metadata

  • Download URL: coursera_transcripts-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for coursera_transcripts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 576f3ac37d01092cb48af6a3a9b573258059133b5e4159eab6f65378f623e589
MD5 995204781b7eafedb9e4dc187830ed30
BLAKE2b-256 084f3249cc52f27e2f04bb37c9ad5e2786b6d23fca4db16891027c9b0d0143f3

See more details on using hashes here.

File details

Details for the file coursera_transcripts-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for coursera_transcripts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81dec42b376d92ef30139846697d560bf4521e45a5bf8f91695150cd69348411
MD5 12aa0caf57663e3cc046fe175735ffd2
BLAKE2b-256 5ef4a2fdf7bb9535aa23c721c1516dd85989247275eb65a13204ab377c97e320

See more details on using hashes here.

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