Skip to content

kshvmdn/latestvid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Vid

A module for interfacing with a YouTube accounts latest upload. Either use globally through your command line or use at the module level. Available via npm.

LatestVid

Usage

Prerequisites: Node v4.0.0

CLI

$ npm install -g latestvid
Usage: latestvid [OPTIONS]
  Open/download the most recent video from any YouTube account.
Options:
  -h --help         Display this help dialog
  -v --version      Display current version
  -d --download     Download latest video instead of opening
  -u --user         YouTube username
Example:
  $ latestvid -u marquesbrownlee      # open latest MKBHD video
  $ latestvid -u marquesbrownlee -d   # download latest MKBHD video

Module

see ./examples for example implementation

$ npm install -S latestvid
const latestvid = require('latestvid');

// to open video
latestvid.getLatest('marquesbrownlee')
  .then(url => {
    console.log(url);
    return latestvid.openUrl(url);
  })
  .catch(e => {
    return console.error(e.message);
  });

// to download video
latestvid.getLatest('marquesbrownlee')
  .then(url => {
    console.log(url);
    return latestvid.downloadVideo(url);
  })
  .catch(e => {
    return console.error(e.message);
  });

Contribute

Feel free to open an issue or make a pull request!

Idea inspired by last-last-week.

About

A command-line tool to open or download the most recent YouTube video for any account.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors