35 lines
755 B
Markdown
35 lines
755 B
Markdown
|
# youtube-transcript
|
||
|
|
||
|
[![npm version](https://badge.fury.io/js/youtube-transcript.svg)](https://badge.fury.io/js/youtube-transcript)
|
||
|
|
||
|
I wanted to extract a transcript from a youtube video but there was only a python script so I created this to do it in node.
|
||
|
This package use unofficial YTB API so it can be broken over the time if no update appears.
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
```bash
|
||
|
$ npm i youtube-transcript
|
||
|
```
|
||
|
|
||
|
or
|
||
|
|
||
|
```bash
|
||
|
$ yarn add youtube-transcript
|
||
|
```
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
```js
|
||
|
import { YoutubeTranscript } from 'youtube-transcript';
|
||
|
|
||
|
YoutubeTranscript.fetchTranscript('videoId or URL').then(console.log);
|
||
|
```
|
||
|
|
||
|
### Methods
|
||
|
|
||
|
- fetchTranscript(videoId: string [,options: TranscriptConfig]): Promise<TranscriptResponse[]>;
|
||
|
|
||
|
## License
|
||
|
|
||
|
**[MIT](LICENSE)** Licensed
|