YTDownload allows you to download youtube videos easily. Now with CLI support!
$ ytdownload <video_url>
example:
$ ytdownload https://www.youtube.com/watch?v=dQw4w9WgXcQ
/* ES6 */
import { download } from "ytdownload";
/* CommonJS*/
const { download } = require("ytdownload");
download("video_url");
// example
download("https://www.youtube.com/watch?v=dQw4w9WgXcQ").then((VideoPath) => {
console.log(VideoPath); // => ./videos/Rick Astley - Never Gonna Give You Up (Video).mp4
});