youtube-pkg
v1.0.1-b
Published
Powerfull downloader YouTube
Downloads
83
Readme
About
This package is used to download & search YouTube media. You can contribute via GitHub
Instalation
To install this package, you can follow the steps below:
$ npm install youtube-pkg
How to usage
If you have installed the package, you can use it with the code example below:
- ECMA Modules Example (ESM)
import Youtube from "youtube-pkg"
const yt = new Youtube()
const out = await yt.search("Somebody Pleasure")
// Logging Output Results
console.log(out)
- CommonJS (CJS)
const Youtube = require("youtube-pkg")
const yt = new Youtube()
yt.search("Somebody pleasure")
.then(result => {
console.log(result);
})
.catch(error => {
console.error('Error:', error);
});
The example above is an example of searching for YouTube Media via a query, Now the code example below is downloading YouTube media via URL.
- ECMA Modules (ESM)
import Youtube from "youtube-pkg"
const yt = new Youtube()
const out = await yt.ytdlnew("https://www.youtube.com/watch?v=xxxx")
// Logging Output Results
console.log(out)
- CommonJS (CJS)
const Youtube = require("youtube-pkg")
const yt = new Youtube()
yt.ytdlnew("https://www.youtube.com/watch?v=xxxx")
.then(result => {
console.log(result);
})
.catch(error => {
console.error('Error:', error);
});
Addition
This package is free & open source, I'm glad you can use the package I made ^_^