yt-subtitles
v1.0.3
Published
Get subtitles from YouTube videos.
Downloads
19
Readme
yt-subtitles
Load the subtitles of the video.
Usage
import { getSubtitles } from "yt-subtitles";
getSubtitles("video id", "ko).then(data => {
console.log(data);
});
Returns
Text[]
- Result
Text - Object
- start:
number
- duration:
number
- font:
Font[]
- content?:
string
Font - Object
- color:
string
- content:
string
import { getSubtitlesList } from "yt-subtitles";
getSubtitlesList("video id").then(data => {
console.log(data);
});
Returns
CaptionTracks[]
CaptionTracks
- baseUrl:
string
- name: { simpleText:
string
} - vssId:
string
- languageCode:
string
- kind?:
string
- isTranslateble:
boolean
Origin
algolia - youtube-captions-scraper