
Extract YouTube Video lyrics and video information.
Usage
npm i yt-caption-extractor
import { getCaptions, getVideoInfo } from 'yt-caption-extractor'
const captions = await getCaptions('SX_ViT4Ra7k')
console.log(captions)
const videoInfo = await getVideoInfo('SX_ViT4Ra7k')
console.log(videoInfo)
Why?
This library is tailor-made for maru.re, designed to extract lyrics and video information from YouTube videos. Initially, I considered using ytdl-core, but due to its large size and lack of ESM support, so I took an afternoon to create this library.
License
MIT License © 2024-PRESENT CofCat