This library can be used to fetch transcripts for YouTube videos
Project description
yt-transcript-fetcher | YouTube Transcript Fetcher
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27587c0fec831adf5e2e155277566a2919a94deb256b0c334d5c2346632a4523
|
|
| MD5 |
1099de90b8f2b472f63abf9f73a95dc5
|
|
| BLAKE2b-256 |
1b610a7d0d99a2414f19d63bf4bbe69dc406397816718b80f151309e3871fc1b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_transcript_fetcher-1.2.1.tar.gz -
Subject digest:
27587c0fec831adf5e2e155277566a2919a94deb256b0c334d5c2346632a4523 - Sigstore transparency entry: 781266329
- Sigstore integration time:
-
Permalink:
SootyOwl/yt-transcript-fetcher@81b99af957757112aaf79090d84a51600e7a61f0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SootyOwl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@81b99af957757112aaf79090d84a51600e7a61f0 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file yt_transcript_fetcher-1.2.1-py3-none-any.whl.
File metadata
- Download URL: yt_transcript_fetcher-1.2.1-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36666562539e3660f0c4b019ffa107a50b7d7e03effe95bae4f0de1959f5b629
|
|
| MD5 |
e9cca9ae2959d5999e0911cfd5a93a29
|
|
| BLAKE2b-256 |
11898c70688bd49d8cea5d14e41a312e78f40417d2e2fc7890f09f161ca8bf65
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_transcript_fetcher-1.2.1-py3-none-any.whl -
Subject digest:
36666562539e3660f0c4b019ffa107a50b7d7e03effe95bae4f0de1959f5b629 - Sigstore transparency entry: 781266332
- Sigstore integration time:
-
Permalink:
SootyOwl/yt-transcript-fetcher@81b99af957757112aaf79090d84a51600e7a61f0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SootyOwl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@81b99af957757112aaf79090d84a51600e7a61f0 -
Trigger Event:
workflow_run
-
Statement type: