youtube-getter

2.1.0 • Public • Published

youtube-getter

npm version npm downloads dependencies-status

A simple module that let you get information from youtube.

How to use

Get a youtube video id with name

It will return the first video id of the search results with keyword(s) (the first argument)

const yg = require('youtube-getter');
yg.searchId('never gonna give you up')
  .then(console.log)
  .catch(console.error);

Get basic youtube video info with the video id

const yg = require('youtube-getter');
yg.getInfoWithId('dQw4w9WgXcQ')
  .then(info => {
    console.log(info.title);
    console.log(info.author);
    console.log(info.date);
    console.log(info.views);
    console.log(info.regionsAllowed);
    console.log(info.beginDesc);
    console.log(info.description);
  })
  .catch(console.error);

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i youtube-getter

Weekly Downloads

2

Version

2.1.0

License

MIT

Unpacked Size

29.7 kB

Total Files

8

Last publish

Collaborators

  • ahoziorce