1.1.0 • Published 1 year ago

youtube-subs v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Youtube Subs npm version

This package will fetch youtube captions and chapters.

NOTE: This is a rebuild of Algolia's YouTube scraper that includes additional functionalities for my own use case.

Installation

$ npm install --save youtube-subs

Usage

import { YoutubeSubs, YoutubeChapters } from 'youtube-subs';

// Fetch all captions
const captions = await YoutubeSubs.getSubs(videoId, options);

// Fetch all chapters and its captions
const chapters = await YoutubeSubs.getSubsByChapter(videoId, options);

// Fetch captions by time in seconds
const captions = await YoutubeSubs.getSubsByTime(videoId, from, to, options);

// Fetch all chapters without captions
const chapters = await YoutubeChapters.getChapters(videoId);

Types

Options

KeyDescriptionDefault
langField name specified in the formen

License

MIT