youtube-subs
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Key Description Default
lang Field name specified in the form en

License

MIT

Package Sidebar

Install

npm i youtube-subs

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

23.5 kB

Total Files

19

Last publish

Collaborators

  • smervs