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

@dil5han/ytdl

v1.0.1

Published

this module act with pytube base

Downloads

73

Readme

YouTube Downloader Module

A simple Node.js module for downloading YouTube video information and links.

Overview

This Node.js module utilizes the non-main.js script to fetch detailed information and video links for a given YouTube video URL. It returns an array containing various details such as video title, thumbnail, views, publish date, and available video resolutions with their respective download links.

Usage

const ytd = require('./non-main.js');

const url = 'https://youtu.be/AWItYh5hqqo?si=vS7AoYBJyoBn6vre';

ytd(url)
  .then((result) => {
    // Handle the result
    console.log('Script executed successfully:', result);
  })
  .catch((error) => {
    // Handle errors
    console.error('Error running Python script:', error);
  });

Example Output

 [
  {
    title: '斗罗大陆所有歌曲(Soul Land Music)(动漫,手游,真人版)【破茧,斗罗大陆,不抛弃不放弃,不舍,蓝银色的海,与你,击溃,如影如芒,凤凰火,向宿命挥拳的人,食神,星河,绝恋,神祇】',
    thumbnail: 'https://i.ytimg.com/vi/AWItYh5hqqo/hq720.jpg?sqp=-oaymwEXCNUGEOADIAQqCwjVARCqCBh4INgESFo&rs=AOn4CLAQt2k9a43jcLZvOD-a9qHlYSX_sw',
    views: 1342392,
    publish_date: '2021-09-27 00:00:00'
  },
  {
    resolution: '144p',
    format: 'video/3gpp',
    url: 'https://rr1---sn-nau-jhcz.googlevideo.com/videoplayback?expire=1703956266&ei=yvqPZYXMNvLWz7sP2eGVyAE&ip=2402%3Ad000%3A8104%3A1128%3Ab02e%3Afc43%3A248b%3A368e&id=o-AM0foTg8eQgMSZLEzM6s0jnSdoBbC0zuyoC1OIPdzIjk&itag=17&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Af&mm=31%2C29&mn=sn-nau-jhcz%2Csn-npoe7nsy&ms=au%2Crdu&mv=m&mvi=1&pcm2cms=yes&pl=53&initcwndbps=576250&vprv=1&mime=video%2F3gpp&gir=yes&clen=48899706&dur=6650.148&lmt=1633924513079602&mt=1703934314&fvip=1&fexp=24007246&c=ANDROID_MUSIC&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAKHZjisZ5VdbUd1Pf3Q_KthCspW9xmGNtO4Ut5xE_vaVAiBDA_M7HvSql2PrmEhf2hoIDfnq2iYG3VR5V4tfdAz3_Q%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AAO5W4owRgIhAIZYOFg_HGgu2SZQko3hn_5llAknFZ1cPvQb1Gci3VlfAiEA1zE7Ix84zXrVHHaWE6HpfwqdOpv1U0L-_T50JM7gf5g%3D'
  },
  {
    resolution: '360p',
    format: 'video/mp4',
    url: 'https://rr1---sn-nau-jhcz.googlevideo.com/videoplayback?expire=1703956266&ei=yvqPZYXMNvLWz7sP2eGVyAE&ip=2402%3Ad000%3A8104%3A1128%3Ab02e%3Afc43%3A248b%3A368e&id=o-AM0foTg8eQgMSZLEzM6s0jnSdoBbC0zuyoC1OIPdzIjk&itag=18&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Af&mm=31%2C29&mn=sn-nau-jhcz%2Csn-npoe7nsy&ms=au%2Crdu&mv=m&mvi=1&pcm2cms=yes&pl=53&initcwndbps=576250&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=6650.102&lmt=1665256526203217&mt=1703934314&fvip=1&fexp=24007246&c=ANDROID_MUSIC&txp=5438434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AJfQdSswRAIgEuSzPX6nNHNel8LOVRrSEfR1jipqtJUUdaGYHm8B1hECIEIKuHgp4exjl1jcRhWjjUjTeyYtUFJV1u0KNeem2VnX&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AAO5W4owRgIhAIZYOFg_HGgu2SZQko3hn_5llAknFZ1cPvQb1Gci3VlfAiEA1zE7Ix84zXrVHHaWE6HpfwqdOpv1U0L-_T50JM7gf5g%3D'
  },
  {
    resolution: '720p',
    format: 'video/mp4',
    url: 'https://rr1---sn-nau-jhcz.googlevideo.com/videoplayback?expire=1703956266&ei=yvqPZYXMNvLWz7sP2eGVyAE&ip=2402%3Ad000%3A8104%3A1128%3Ab02e%3Afc43%3A248b%3A368e&id=o-AM0foTg8eQgMSZLEzM6s0jnSdoBbC0zuyoC1OIPdzIjk&itag=22&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Af&mm=31%2C29&mn=sn-nau-jhcz%2Csn-npoe7nsy&ms=au%2Crdu&mv=m&mvi=1&pcm2cms=yes&pl=53&initcwndbps=576250&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=6650.102&lmt=1633926156667997&mt=1703934314&fvip=1&fexp=24007246&c=ANDROID_MUSIC&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AJfQdSswRQIgRNrG9lLLwoV3Coi3SumYSAnAkx2xEXijLKgcXSI1LpgCIQDeuweEvYX-WIrAIC8rHjPtToydF10IIzHBpGdco7HY4Q%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AAO5W4owRgIhAIZYOFg_HGgu2SZQko3hn_5llAknFZ1cPvQb1Gci3VlfAiEA1zE7Ix84zXrVHHaWE6HpfwqdOpv1U0L-_T50JM7gf5g%3D'
  }]

Installation

Clone the repository and install dependencies:

git clone https://github.com/your-username/your-repo.git
cd your-repo
npm install

License

This project is licensed under the MIT License.