Skip to content

A Python script to fetch YouTube video transcripts, supporting automatic detection and retrieval of subtitles in various languages using the youtube-transcript-api.

License

Notifications You must be signed in to change notification settings

neil-re/youtube-transcript-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Transcript Fetcher

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.

Features

  • List available transcripts for a YouTube video.
  • Fetch transcripts in the specified language.
  • Handle errors gracefully when transcripts are not available.

Installation

To use this script, you need to install the youtube-transcript-api package. You can install it using pip:

pip install youtube-transcript-api

Usage

  1. Clone this repository:
git clone https://github.com/neil-re/youtube-transcript-fetcher.git
cd youtube-transcript-fetcher
  1. 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.

Contributing

If you want to contribute to this project, follow these steps:

  1. Fork the repository.
  2. Create a new branch with your feature or bug fix.
  3. Commit your changes.
  4. Push to the branch.
  5. Create a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

If you have any questions or suggestions, feel free to open an issue or contact the repository owner at https://www.youtube.com/@NeilVideos.

About

A Python script to fetch YouTube video transcripts, supporting automatic detection and retrieval of subtitles in various languages using the youtube-transcript-api.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages