Skip to content

dialoqbase/yt-transcript

Repository files navigation

Yt transcript

A simple JavaScript API which allows you to get the transcript/subtitles for a given YouTube video. It is inspired by a Python-based project YouTube Transcript API.

Installation

npm install yt-transcript

Usage

import { YtTranscript } from 'yt-transcript';

const ytTranscript = new YtTranscript({videoId: 'dQw4w9WgXcQ'});

ytTranscript.listAllTranscripts().then((transcript) => {
  console.log(transcript);
});

ytTranscript.getTranscript().then((transcript) => {
  console.log(transcript);
});

Important Note

This package uses the undocumented YouTube API to fetch the transcript. It is not guaranteed to work in the future. Use at your own risk. I'm not responsible for any damage caused by using this package.

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •