npm.io
0.0.15 • Published 2 years ago

@nechlophomeriaa/ytdl

Licence
ISC
Version
0.0.15
Deps
3
Size
23 kB
Vulns
1
Weekly
0
Stars
4

Installation

> npm i @nechlophomeriaa/ytdl

Usage

// Common JS
const { yt, ytmp3, ytmp4 } = require("@nechlophomeriaa/ytdl")
// ESM
import { yt, ytmp3, ytmp4 } from "@nechlophomeriaa/ytdl"

Example Audio Downloader

;async () => {
  const yt = await ytmp3("https://youtu.be/R95ILhksGt8")
  console.log(yt)
}

Example Video Downloader

/**
 * @param { String } url
 * @param { String | Number } quality
 */

;async () => {
  const yt = await ytmp4("https://youtu.be/R95ILhksGt8", 1080) //If quality is undefined, it will resolve with 360p quality
  console.log(yt)
}

Thanks for using this module

Keywords