youtube-captions-scraper
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/youtube-captions-scraper package

2.0.3 • Public • Published

Youtube Captions scraper

Fetch youtube user submitted or fallback to auto-generated captions

Installation

  • > npm install -S youtube-captions-scraper OR
  • > yarn add youtube-captions-scraper

Usage

// ES6 / TypeScript
import { getSubtitles } from 'youtube-captions-scraper';

getSubtitles({
  videoID: 'XXXXX', // youtube video id
  lang: 'fr' // default: `en`
}).then(captions => {
  console.log(captions);
});

// ES5
var getSubtitles = require('youtube-captions-scraper').getSubtitles;

getSubtitles({
  videoID: 'XXXXX', // youtube video id
  lang: 'fr' // default: `en`
}).then(function(captions) {
  console.log(captions);
});

Captions will be an array of object of this format:

{
  "start": Number,
  "dur": Number,
  "text": String
}

Readme

Keywords

none

Package Sidebar

Install

npm i youtube-captions-scraper

Weekly Downloads

1,826

Version

2.0.3

License

MIT

Unpacked Size

9.68 kB

Total Files

13

Last publish

Collaborators

  • lukyvj
  • marielaure
  • ejaldorau
  • haroenv
  • rayrutjes
  • jerska
  • samouss
  • therealwebby
  • francoischalifour
  • jonmontane
  • tkrugg
  • seafoox
  • sylvainh
  • lorrissaintgenez
  • broujo
  • e-krebs
  • kombucha
  • sylvain
  • crawler-team
  • amcdaid106
  • devinalgolia
  • jvenezia
  • otomatik
  • sarahdayan
  • maximehuang
  • guitek
  • matthewbond
  • shaejaz
  • cyril.descossy
  • tatsuro
  • mathougui
  • xavdh
  • agdavid
  • rasemotte
  • plnech
  • shortcuts
  • praagyajoshi
  • alphonseb
  • leodau
  • fabienmotte
  • sarahfranc
  • millotp
  • daltondickalgolia
  • dhaya.b
  • bengreenbank
  • algabet
  • alg-bgastinne
  • emmanuel.fortin
  • dylantientcheu
  • andy_ds
  • robertmogos
  • jcohonner-algolia
  • catalgolia
  • raed-algolia
  • aymeric.giraudet
  • pjankowski5312
  • valentindotxyz
  • eventexperiences_algolia
  • taylorcjohnson_algolia
  • sfaiqh
  • instantsearch-bot
  • fluf
  • leviwhalen
  • abodelot
  • mprevell97
  • jkaho
  • antoine.gilles
  • wwalser
  • bhinchley-algolia
  • louishousiaux
  • jsok_algolia
  • alg-admin
  • hugowit
  • drodriguln
  • scyganek-algolia
  • jasonberry
  • bhcastle
  • gavinwade12
  • algthomasbritton
  • fernando_beck_algolia
  • vascobettencourt
  • mariaaalungu
  • cdhawke-algolia
  • felipe-bernal
  • morgan-algolia2
  • julia-francais
  • jcalgo
  • aallam.alg
  • iam4x