npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gifted-ytdl-esm

v0.7.0

Published

A Simple Yet Powerful YouTube Downloader Package

Downloads

415

Readme

Installation:

npm install gifted-ytdl-esm

Download Mp4:

import YTDL from 'gifted-ytdl-esm';
const ytdl = new YTDL();
(async() => {
await ytdl.mp4("https://youtu.be/abcdef").then((result) =>  {
   console.log(result)
}).catch((error) => {
   console.log(error)
  })
})()

Example Response:

Download Mp3:

import YTDL from 'gifted-ytdl-esm';
const ytdl = new YTDL();
(async() => {
await ytdl.mp3("https://youtu.be/abcdef").then((result) =>  {
   console.log(result)
}).catch((error) => {
   console.log(error)
  })
})()

Example Response:

{
   "title": "Alan Walker - The Spectre (Lyrics)",
   "id": "qHDJSRlNhVs",
   "duration": "3:11",
   "thumbnail": "https://i.ytimg.com/vi/qHDJSRlNhVs/hq720.jpg",
   "yturl": "https://youtu.be/qHDJSRlNhVs",
   "media": {
      "64kbps": {
        "url": "https://tmpfiles.org/dl/12562776/23992cbb19.mp3",
        "size": ""
      },
      "96kbps": {
        "url": "https://tmpfiles.org/dl/12562780/23992cbb19.mp3",
        "size": ""
      },
      "192kbps": {
        "url": "https://tmpfiles.org/dl/12562782/23992cbb19.mp3",
        "size": ""
      },
      "256kbps": {
        "url": "https://tmpfiles.org/dl/12562785/23992cbb19.mp3",
        "size": ""
      },
      "320kbps": {
        "url": "https://tmpfiles.org/dl/12562787/23992cbb19.mp3",
        "size": ""
      },
      "128kbps": {
        "url": "https://tmpfiles.org/dl/12562788/23992cbb19.mp3",
        "size": "2.9 MB"
      }
    }
}

Perform Search:

import YTDL from 'gifted-ytdl-esm';
const ytdl = new YTDL();
(async() => {
await ytdl.search("Spectre").then((result) =>  {
   console.log(result)
}).catch((error) => {
   console.log(error)
  })
})()

Example Response:

{
  "data": [
      {
        "title": "Alan Walker - The Spectre",
        "url": "https://youtu.be/wJnBTPUQS5A",
        "img": "https://i.ytimg.com/vi/wJnBTPUQS5A/hqdefault.jpg",
        "author": {
          "name": "Alan Walker",
          "url": "https://youtube.com/channel/UCJrOtniJ0-NWz37R30urifQ"
        }
      },
      {
        "title": "Alan Walker - The Spectre (Lyrics)",
        "url": "https://youtu.be/qHDJSRlNhVs",
        "img": "https://i.ytimg.com/vi/qHDJSRlNhVs/hq720.jpg",
        "author": {
          "name": "7clouds",
          "url": "https://youtube.com/@7clouds"
        }
      },
      {
        "title": "This was the Greatest RANKED COMEBACK in Spectre Divide (HITTING EMERALD RANK)",
        "url": "https://youtu.be/6uWH8dlHqn8",
        "img": "https://i.ytimg.com/vi/6uWH8dlHqn8/hq720.jpg",
        "author": {
          "name": "staycation",
          "url": "https://youtube.com/@staycationtg"
        }
      },
      {
        "title": "Spectre",
        "url": "https://youtu.be/CLiDemXYSLc",
        "img": "https://i.ytimg.com/vi/CLiDemXYSLc/hq720.jpg",
        "author": {
          "name": "Radiohead",
          "url": "https://youtube.com/channel/UCq19-LqvG35A-30oyAiPiqA"
        }
      },
      {
        "title": "SPECTRE - Official Trailer - November 6",
        "url": "https://youtu.be/ujmoYyEyDP8",
        "img": "https://i.ytimg.com/vi/ujmoYyEyDP8/hq720.jpg",
        "author": {
          "name": "Sony Pictures Entertainment",
          "url": "https://youtube.com/@sonypictures"
        }
      },
      {
        "title": "RDB Showcases Rolls Royce Elegance: A Spectre Experience. Plus SVJ & 720S",
        "url": "https://youtu.be/0_RTK0d_bgY",
        "img": "https://i.ytimg.com/vi/0_RTK0d_bgY/hqdefault.jpg",
        "author": {
          "name": "RDB LA",
          "url": "https://youtube.com/@RDBLA"
        }
      },
      {
        "title": "Alan Walker - Spectre / Force / Fade [NCS Tribute Remake]",
        "url": "https://youtu.be/KsxoJwX1w-E",
        "img": "https://i.ytimg.com/vi/KsxoJwX1w-E/hq720.jpg",
        "author": {
          "name": "luunar!",
          "url": "https://youtube.com/@1uunar"
        }
      },
      {
        "title": "Rolls-Royce Spectre - INSANE Luxury!",
        "url": "https://youtu.be/ANPKMbm_cvQ",
        "img": "https://i.ytimg.com/vi/ANPKMbm_cvQ/hq720.jpg",
        "author": {
          "name": "carwow",
          "url": "https://youtube.com/@carwow"
        }
      },
      {
        "title": "Spectre Divide Gameplay and Impressions...",
        "url": "https://youtu.be/CP1jk0Cta0Y",
        "img": "https://i.ytimg.com/vi/CP1jk0Cta0Y/hq720.jpg",
        "author": {
          "name": "jackfrags",
          "url": "https://youtube.com/@jackfrags"
        }
      },
      {
        "title": "Sam Smith - Writing's On The Wall (from Spectre) (Official Music Video)",
        "url": "https://youtu.be/8jzDnsjYv9A",
        "img": "https://i.ytimg.com/vi/8jzDnsjYv9A/hq720.jpg",
        "author": {
          "name": "SAM SMITH",
          "url": "https://youtube.com/channel/UCvpDeGlR5wLP9Z3Tb6K0Xfg"
        }
      },
      {
        "title": "Spectre- Opening Tracking Shot in 1080p",
        "url": "https://youtu.be/cbqv1kbsNUY",
        "img": "https://i.ytimg.com/vi/cbqv1kbsNUY/hq720.jpg",
        "author": {
          "name": "Trent Newton",
          "url": "https://youtube.com/@trentthedirector"
        }
      },
      {
        "title": "Spectre 1977",
        "url": "https://youtu.be/LimAIJAzo1U",
        "img": "https://i.ytimg.com/vi/LimAIJAzo1U/hqdefault.jpg",
        "author": {
          "name": "JimmyTakesPhotos",
          "url": "https://youtube.com/@bookman60"
        }
      },
      {
        "title": "Spectre Divide Preview: A Breath of Fresh Air for Tactical Shooters",
        "url": "https://youtu.be/sDOIzFFQ00w",
        "img": "https://i.ytimg.com/vi/sDOIzFFQ00w/hq720.jpg",
        "author": {
          "name": "IGN",
          "url": "https://youtube.com/@IGN"
        }
      },
      {
        "title": "Spectre Divide is a FAILURE!",
        "url": "https://youtu.be/to0xbvkmIkY",
        "img": "https://i.ytimg.com/vi/to0xbvkmIkY/hq720.jpg",
        "author": {
          "name": "TechWares",
          "url": "https://youtube.com/@TechWares"
        }
      },
      {
        "title": "SPECTRE TRAILER",
        "url": "https://youtu.be/LTDaET-JweU",
        "img": "https://i.ytimg.com/vi/LTDaET-JweU/hq720.jpg",
        "author": {
          "name": "James Bond 007",
          "url": "https://youtube.com/@007"
        }
      },
      {
        "title": "SPECTRE - Information Is All",
        "url": "https://youtu.be/l_vcRIBc6Yo",
        "img": "https://i.ytimg.com/vi/l_vcRIBc6Yo/hq720.jpg",
        "author": {
          "name": "Unnameable Media",
          "url": "https://youtube.com/@UnnameableMedia"
        }
      },
      {
        "title": "Alan Walker - Spectre",
        "url": "https://youtu.be/p7nIEJ1vpFM",
        "img": "https://i.ytimg.com/vi/p7nIEJ1vpFM/hq720.jpg",
        "author": {
          "name": "Alan Walker",
          "url": "https://youtube.com/channel/UCJrOtniJ0-NWz37R30urifQ"
        }
      },
      {
        "title": "Spectre 4K HDR | End Scene 2/2",
        "url": "https://youtu.be/9RZSS0pl3MI",
        "img": "https://i.ytimg.com/vi/9RZSS0pl3MI/hq720.jpg",
        "author": {
          "name": "Apex Clips",
          "url": "https://youtube.com/@ApexClips4k"
        }
      },
      {
        "title": "SPECTRE | 007 Meets Madeleine Swann – Daniel Craig, Lea Séydoux | James Bond",
        "url": "https://youtu.be/O-Y8-1esSLI",
        "img": "https://i.ytimg.com/vi/O-Y8-1esSLI/hq720.jpg",
        "author": {
          "name": "James Bond 007",
          "url": "https://youtube.com/@007"
        }
      },
      {
        "title": "Alan Walker ‒ The Spectre (Lyrics / Lyrics Video)",
        "url": "https://youtu.be/lmyd-6zuArk",
        "img": "https://i.ytimg.com/vi/lmyd-6zuArk/hq720.jpg",
        "author": {
          "name": "Taz Network",
          "url": "https://youtube.com/@taznetwork"
        }
      },
      {
        "title": "Spectre",
        "url": "https://youtu.be/gaF37WP2Vfs",
        "img": "https://i.ytimg.com/vi/gaF37WP2Vfs/movieposter_en.jpg",
        "author": {
          "name": "YouTube Movies & TV",
          "url": "https://youtube.com/channel/UCJrOtniJ0-NWz37R30urifQ"
        }
      }
    ]
}