This repository contains a Python script that fetches transcripts for YouTube videos using the youtube-transcript-api
. The script supports automatic detection of available subtitles and can retrieve transcripts in various languages, including automatically generated ones.
- List available transcripts for a YouTube video.
- Fetch transcripts in the specified language.
- Handle errors gracefully when transcripts are not available.
To use this script, you need to install the youtube-transcript-api
package. You can install it using pip:
pip install youtube-transcript-api
- Clone this repository:
git clone https://github.com/neil-re/youtube-transcript-fetcher.git
cd youtube-transcript-fetcher
- Run the script:
python youtube_transcript_fetcher.py
Replace YOUR_VIDEO_ID
in the script with the ID of the YouTube video you want to fetch transcripts for.
If you want to contribute to this project, follow these steps:
- Fork the repository.
- Create a new branch with your feature or bug fix.
- Commit your changes.
- Push to the branch.
- Create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to open an issue or contact the repository owner at https://www.youtube.com/@NeilVideos.