Metadata-Version: 2.4
Name: yt-transcript-fetcher
Version: 1.2.0
Summary: This library can be used to fetch transcripts for YouTube videos
Project-URL: Home Page, https://github.com/SootyOwl/yt-transcript-fetcher
Project-URL: Issue Tracker, https://github.com/SootyOwl/yt-transcript-fetcher/issues
Project-URL: Release Notes, https://github.com/SootyOwl/yt-transcript-fetcher/releases
Project-URL: CHANGELOG, https://github.com/SootyOwl/yt-transcript-fetcher/blob/main/CHANGELOG.md
Author-email: Dan Eagle <dan@tyto.cc>
License: MIT
License-File: LICENSE
Keywords: caption,captions,subtitle,subtitles,transcript,transcripts,video,youtube,youtube-api,youtube-subtitles,youtube-transcripts,yt,yt-transcript
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4.0,>=3.9
Requires-Dist: argcomplete>=3.6.2
Requires-Dist: requests<3.0.0,>=2.32.4
Provides-Extra: build
Requires-Dist: uv~=0.8.14; extra == 'build'
Description-Content-Type: text/markdown

# yt-transcript-fetcher | YouTube Transcript Fetcher

[![Run Tests](https://github.com/SootyOwl/yt-transcript-fetcher/actions/workflows/run-tests.yml/badge.svg)](https://github.com/SootyOwl/yt-transcript-fetcher/actions/workflows/run-tests.yml)
[![PyPI - Version](https://img.shields.io/pypi/v/yt-transcript-fetcher)](https://pypi.org/project/yt-transcript-fetcher/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/yt-transcript-fetcher)
![PyPI - License](https://img.shields.io/pypi/l/yt-transcript-fetcher)
![PyPI - Downloads](https://img.shields.io/pypi/dm/yt-transcript-fetcher)

A python package to fetch YouTube video transcripts.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install yt-transcript-fetcher.

```bash
pip install yt-transcript-fetcher
```

## Usage

Basic usage examples can be found in the [examples](https://github.com/SootyOwl/yt-transcript-fetcher/tree/main/examples) directory.

### Command Line Interface (CLI)
The package includes a basic command line interface for fetching transcripts. You can run the following command:

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

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

```bash
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:

```python
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](https://choosealicense.com/licenses/mit/)
