Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

updated-youtube-info

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

updated-youtube-info

Fetch meta information about YouTube videos, fix 403 error

latest
Source
npmnpm
Version
1.4.7
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

Youtube Info

Build Status

Purpose

A Node.js module that fetches meta information about YouTube videos. The information is scraped directly from the YouTube website, so no need for a Google API-key.

This project is in no way affiliated with YouTube.

Installation

Install as a module via npm.

$ npm install youtube-info

Usage

http//www.youtube.com/watch?v={videoId}

var fetchVideoInfo = require('youtube-info');
fetchVideoInfo(videoId, cb);
ParameterMeaning
videoIdID of youtube Video
callback(optional) callback function

Promises API

var fetchVideoInfo = require('youtube-info');
fetchVideoInfo('{videoId}').then(function (videoInfo) {
  console.log(videoInfo);
});

Callback API

var fetchVideoInfo = require('youtube-info');
fetchVideoInfo('{videoId}', function (err, videoInfo) {
  if (err) throw new Error(err);
  console.log(videoInfo);
});

Result

{
  videoId: '{video Id}',
  url: '{video url}',
  title: '{video title}',
  description: '{video description as HTML}',
  owner: '{video owner}',
  channelId: '{owner channel id}',
  thumbnailUrl: '{video thumbnail url}',
  embedURL: '{video embed url}',
  datePublished: '{video publication date}',
  genre: '{video genre}',
  paid: {true/false},
  unlisted: {true/false},
  isFamilyFriendly: {true/false},
  duration: {video duration in seconds},
  views: {number of views},
  regionsAllowed: [ '{two letter country code}', ... ],
  commentCount: {number of comments},
  likeCount: {number of likes},
  dislikeCount: {number of dislikes},
  channelThumbnailUrl: {channel thumbnail url}
}

Keywords

youtube

FAQs

Package last updated on 23 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts