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.2.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.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coursera_transcripts-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 87f5a2ebca7db077c5da3979e116210e8d5512f3a1220dcd07fd37a4800d6d88
MD5 29fc21fe7c0134a2d07c4728ee828ec5
BLAKE2b-256 7b4c4fffe0fa0e0bf2ae14547156e8cae7db1a5d48d24fe96580a1ddacbbd789

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coursera_transcripts-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a6ba7abefc5505fa40fa1dc38f6fc2136adb3d91e21c1e606593ea0eb0319df
MD5 a6f687ad28adb31180b0ce60efb0ea3f
BLAKE2b-256 82a5dff7af2d03820fdd7304545a2e5d85288b84ad4a9f6ab09e33b75d3fb3b9

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