About
Fetch original or fallback to auto-generated Youtube captions.
Based on the original youtube-captions-scraper, I made a little change to make it supports not only user-submitted but also the original captions.
Installation
npm i youtube-captions-scraper-x
Usage
const getSubtitles = ; { const captions = await // do something with captions console};
Captions will be an array of object of this format:
"start": Number "duration": Number "text": String