Skip to main content

Mr. Transcript

DOI PyPI Downloads PyPI - License PyPI - Version

A convenient wrapper for the youtube-transcript-api library designed to retrieve YouTube video transcripts quickly and reliably.

Key Features

  • Automatic URL Handling: Supports various YouTube link formats, including youtube.com, youtu.be, shorts, and embed.
  • Intelligent Search: The package first looks for manually created transcripts; if they are unavailable, it automatically switches to YouTube's auto-generated ones.
  • Timecodes: Option to add timestamps to each text block.
  • Language List: Quickly retrieve a dictionary of all available languages for a specific video.
  • Type Safety: Full support for type annotations for better development experience.

Installation

Install the package via pip:

pip install mr-transcript

Or using uv:

uv add mr-transcript

Quick Start

from mr_transcript import get_transcript, get_languages

url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

# 1. Check available languages
languages = get_languages(url)
print(f"Available languages: {languages}")

# 2. Retrieve transcript text (e.g., in English)
if "en" in languages:
    text = get_transcript(url, language="en", timecodes=True)
    print(text[:500])  # Prints the first 500 characters

AI Agent Skill

This repository includes a specialized skill for AI agents (like Gemini CLI). It helps the agent provide expert assistance with Python coding, URL parsing, and integrating this library into your projects.

To install the skill, run:

npx skills add BogdanovychA/mr-transcript --skill mr-transcript

Function Descriptions

get_transcript(video_id, language, timecodes=False)

Retrieves the full transcript text.

  • video_id: Video ID or a full link.
  • language: Language code (e.g., 'en', 'uk').
  • timecodes: If True, adds the start time to each text block.

get_languages(video_id)

Returns a dictionary of all available languages for the video.

  • Format: {"language_code": "language_name"} (e.g., {"en": "English"}).

License

This project is licensed under the MIT License.

Metadata

Release files for mr-transcript 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mr-transcript 0.1.2
File Size Uploaded Provenance
mr_transcript-0.1.2.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mr-transcript 0.1.2
File Interpreter ABI Platform
mr_transcript-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / mr_transcript-0.1.2.tar.gz

Download URL mr_transcript-0.1.2.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e4142b991f2a93da47a468bbfde55007455b4de7ad1db8cceb9af7f09a5405c5
BLAKE2b-256 checksum
How to use checksums
e4d529f7598e43f0e42ef8dc2fc3e7c06a6836f5fe0d6656630d8de56a7f0e50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / mr_transcript-0.1.2-py3-none-any.whl

Download URL mr_transcript-0.1.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aae7be36f0ea38d955839fd6454a5fceef9ac70373b8449c838f72f1c2759314
BLAKE2b-256 checksum
How to use checksums
77475067ed4afbeb362784120cb3114ce7f1349037c10557774f57afefd89650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Security for mr-transcript 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page