1.0.1 • Published 3 years ago

@alufi/ytsr v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

node-ytsr

A light-weight ytsr for Alufi Bot.

Forked from ytsr.

Feature

  • Search for videos on YouTube

Usage

const ytsr = require('@alufi/ytsr');

ytsr('videoName', { safeSearch: true, limit: 1 }).then(result => {
    let song = result.items[0];
    console.log('ID: ' + song.id);
    console.log('Name: ' + song.name);
    console.log('URL: ' + song.url);
    console.log('Views: ' + song.views);
    console.log('Duration: ' + song.duration);
    console.log('Live: ' + song.isLive);
})

/*
ID: videoId
Name: videoName
URL: videoURL
Views: videoViews
Duration: videoDurationMs
Live: videoIfLive (Boolean: false/true)
*/