Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

youtube-metadata-scraper

pop-code21MIT0.0.3TypeScript support: included

Install

readme

youtube-metadata-scraper

Install

// using yarn
yarn add youtube-metadata-scraper

// using npm
npm install youtube-metadata-scraper

Usage

Scraper

import { scrap } from 'youtube-metadata-scraper';

scrap('videoId') // pass the videoId
    .then((metadata) => console.log(metadata))
    .catch((error) => console.log(error));

Watcher

import { watch } from 'youtube-metadata-scraper';

watch(
    'videoId', // pass the videoId
    5, // the interval in seconds
    (metadata) => console.log(metadata), // the metadata callback
    (error) => console.log(error) // the error callback
);

Cli

Usage: youtube-metadata-scraper [options] [command]

Options:
  -h, --help                 display help for command

Commands:
  scrap <videoId>            scrap youtube metadata
  watch [options] <videoId>  watch youtube metadata
  help [command]             display help for command