Youtube Downloader
- Used to download video & audio from Youtube
- No login or password are required
Installation
- @tobyg74/youtube-api-dl requires Node.js v10+ to run.
Install from NPM
npm install @tobyg74/youtube-api-dl
Install from YARN
yarn add @tobyg74/youtube-api-dl
Usage
const { YoutubeDL } = require("@tobyg74/youtube-api-dl");
const youtube_url = "https://youtu.be/Gn2rk1H5_kg";
YoutubeDL(youtube_url).then((result) => {
console.log(result);
});
Response
{
status: "success" | "error"
message?: string
result?: {
title: string
thumbnail: string
duration: string
video: string[]
audio: string[]
}
}