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.3.tar.gz (10.8 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.3-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coursera_transcripts-0.1.3.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coursera_transcripts-0.1.3.tar.gz
Algorithm Hash digest
SHA256 426352b6224ec11227708d86616e965ec874e2b25f7293ff870480612f44c794
MD5 8b79be50908656c88db8941197422412
BLAKE2b-256 220af0c2e04657b88a0554c07a78d398d5d9b02cd5c3cbd3bc7b1e8081e8307e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coursera_transcripts-0.1.3.tar.gz:

Publisher: publish.yml on KavinMK05/coursera-transcript-generator

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

File details

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

File metadata

File hashes

Hashes for coursera_transcripts-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3bd14430a61a682c14b698ec9b0226e2dbdc7c1b75589570525670c2eee1f1cf
MD5 67e209782796510fc6244ff49e3cbc33
BLAKE2b-256 1654bf905f7584498a5c6294aa41a6d66c0798bbd9c9696e3fc7c4659d65c39b

See more details on using hashes here.

Provenance

The following attestation bundles were made for coursera_transcripts-0.1.3-py3-none-any.whl:

Publisher: publish.yml on KavinMK05/coursera-transcript-generator

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