Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

scrape-youtube

0.0.4 • Public • Published

scrape-youtube

NPM

What is this?*

scrape-youtube is A NodeJS Package to scrape information from search results. This supports videos, playlists, channels, movies and shows. Right now, It supports three basic options that are explained below. This one uses jsdom 12.0.0 and the latest version of jQuery to retrieve and parse the results.

Note: scrape-youtube@0.0.4+ uses promises instead of callbacks.

Install

npm install --save scrape-youtube

Usage

var search = require('scrape-youtube');

Basic Search


search("Upside down and inside out").then(function(results){
    console.log(results);
});

Additional Options

  • limit
    • Number of videos returned in the response. Max 20, minimum 0. default=20
  • type
    • The type of results you want to receive. Allowed: any, video, channel, playlist, movie, show default=video
  • null_values
    • Allow null values to be returned in the results. default=false
search("Upside down and inside out", {
    limit : 5,
    type : "video"
}).then(function(results){
    console.log(results);
}, function(err){
    console.log(err);
});

TODO

  • Multiple Pages
  • Sorting Options

Additional Notes

  • Please report any issues here

install

npm i scrape-youtube

Downloadsweekly downloads

7

version

0.0.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability