1.0.3 • Published 4 years ago

youtube-metadata-from-url v1.0.3

Weekly downloads
60
License
MIT
Repository
github
Last release
4 years ago

youtube-metadata-from-url

Simple module to get a video metadata from url

npm npm

NPM

youtube-metadata-from-url is a simple module to get a youtube metadata passing just the video url.

Install

npm install youtube-metadata-from-url --save

Example

const youtube = require('youtube-metadata-from-url');
const url = 'https://youtu.be/TRqiFPpw2fY';

youtube.metadata(url).then(function(json) {
	console.log(json);
}, function(err){
	console.log(err);
});

Response

{
  "thumbnail_url": "https://i.ytimg.com/vi/WC5FdFlUcl0/hqdefault.jpg",
  "type": "video",
  "thumbnail_width": 480,
  "html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/WC5FdFlUcl0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
  "author_name": "AudioslaveVEVO",
  "height": 270,
  "width": 480,
  "provider_name": "YouTube",
  "author_url": "https://www.youtube.com/user/AudioslaveVEVO",
  "title": "Audioslave - Be Yourself (Album Version, Closed Captioned)",
  "provider_url": "https://www.youtube.com/",
  "thumbnail_height": 360,
  "version": "1.0"
}

License

This project is provided for educational purposes only. It is not affiliated with and has not been approved by Youtube.

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago