Skip to main content

This library can be used to fetch transcripts for YouTube videos

Project description

yt-transcript-fetcher | YouTube Transcript Fetcher

Run Tests PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads

A python package to fetch YouTube video transcripts.

Installation

Use the package manager pip to install yt-transcript-fetcher.

pip install yt-transcript-fetcher

Usage

Basic usage examples can be found in the examples directory.

Command Line Interface (CLI)

The package includes a basic command line interface for fetching transcripts. You can run the following command:

yt-transcript-fetcher <video_id> --list-languages

This will list all available languages for the specified video ID.

yt-transcript-fetcher <video_id> --download <language_code>

This will download the transcript for the specified video ID in the given language code and output it to standard output.

Python API

You can also use the package as a Python module. Here is a basic example:

from yt_transcript_fetcher import list_languages, get_transcript
video_id = "dQw4w9WgXcQ"  # Replace with your video ID
languages = list_languages(video_id)
print("Available languages:", languages)
transcript = get_transcript(video_id, language_code="en")
print("Transcript:", transcript)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

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

yt_transcript_fetcher-1.2.1.tar.gz (112.9 kB view details)

Uploaded Source

Built Distribution

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

yt_transcript_fetcher-1.2.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file yt_transcript_fetcher-1.2.1.tar.gz.

File metadata

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

File hashes

Hashes for yt_transcript_fetcher-1.2.1.tar.gz
Algorithm Hash digest
SHA256 27587c0fec831adf5e2e155277566a2919a94deb256b0c334d5c2346632a4523
MD5 1099de90b8f2b472f63abf9f73a95dc5
BLAKE2b-256 1b610a7d0d99a2414f19d63bf4bbe69dc406397816718b80f151309e3871fc1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_transcript_fetcher-1.2.1.tar.gz:

Publisher: semantic-release.yml on SootyOwl/yt-transcript-fetcher

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

File details

Details for the file yt_transcript_fetcher-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for yt_transcript_fetcher-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36666562539e3660f0c4b019ffa107a50b7d7e03effe95bae4f0de1959f5b629
MD5 e9cca9ae2959d5999e0911cfd5a93a29
BLAKE2b-256 11898c70688bd49d8cea5d14e41a312e78f40417d2e2fc7890f09f161ca8bf65

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_transcript_fetcher-1.2.1-py3-none-any.whl:

Publisher: semantic-release.yml on SootyOwl/yt-transcript-fetcher

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