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


โœจ 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.4.tar.gz (11.0 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.4-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for coursera_transcripts-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1eff9679206fc7a2248b8f4f40f67ccaaa60d6faae9cf23bf1bfe2bdfce0a6e1
MD5 7c002205bbc6ccc4bca6e478926bf33d
BLAKE2b-256 6db0a455a4d0e0caddf15ede34d7fcee925d510fbd174a3a442328e777a8930d

See more details on using hashes here.

Provenance

The following attestation bundles were made for coursera_transcripts-0.1.4.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.4-py3-none-any.whl.

File metadata

File hashes

Hashes for coursera_transcripts-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 65695fa40448d1878c50c2bcd1eec6a113f01f9b5b123b7afab2a9b2fc2dc35e
MD5 2466d4532b86d0ecd5f94565190156d3
BLAKE2b-256 d3fe0ad406c01586b9d4b64a45936f988fb3bbbec2d19fb98ec4e36dd394b1eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for coursera_transcripts-0.1.4-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