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 🙏

© 2026 – Pkg Stats / Ryan Hefner

subscribe-you-tube-channel

v1.0.4

Published

Save playlist from YouTube

Readme

⚠️ IMPORTANT DISCLAIMER

This project is experimental and for personal use only. Use at your own risk. This tool interacts with YouTube's services and may be subject to YouTube's Terms of Service. The authors are not responsible for any issues that may arise from using this tool.


Description

A CLI tool to download videos from YouTube playlists using yt-dlp. It:

  • saves videos as mp4 files
  • groups videos from the same playlist into a sub-folder
  • tracks downloaded videos using yt-dlp's download archive (avoids re-downloading)
  • supports limiting the number of videos per subscription

Prerequisites

This tool requires yt-dlp to be installed on your system.

# Install via pip
$ pip install yt-dlp

# Or via homebrew
$ brew install yt-dlp

[!TIP]

Find where it's installed:

$ which yt-dlp

yt-dlp will automatically use ffmpeg if available. Install ffmpeg:

$ brew install ffmpeg

# or
$ sudo apt install ffmpeg

Installation

$ npm i -g subscribe-you-tube-channel

$ mkdir ~/.subscribe-you-tube-channel
$ subscribe-you-tube-channel init -C ~/.subscribe-you-tube-channel

Options

$ subscribe-you-tube-channel init -h
Initialize the working directory
Usage: subscribe-you-tube-channel init [options]

Options:
  --version        Show version number                                                     [boolean]
  -C, --directory  Specify the working directory
                                                                          [string] [default: <$CWD>]
  -q, --quiet      Do not output to stdout or stderr                      [boolean] [default: false]
  -h, --help       Show help                                                               [boolean]

Examples:
  subscribe-you-tube-channel -C ~/.subscribe-you-tube-channel

Manage subscriptions

Edit the sample subscription file with a real YouTube channel or playlist URL:

$ vim ~/.subscribe-you-tube-channel/subscriptions/sample.json

Example subscription file:

{
  "url": "https://www.youtube.com/@ChannelName/videos",
  "dateAfter": "now-1month",
  "maxDurationInSecond": 1800
}

[!TIP]

The dateAfter value follows the $ yt-dlp --dateafter convention

| Unit | Example | Meaning | | --------- | ------------ | ------------------------- | | day | now-10days | Since 10 days ago | | week | now-2weeks | Since 14 days ago | | month | now-1month | Since roughly 30 days ago | | year | now-1year | Since 365 days ago |

[!TIP]

The maxDurationInSecond configuration is the equivalent of $ yt-dlp --match-filter option with a duration<=<maxDurationInSecond> filter

| Example | Meaning | | ----------------- | ----------------------------------- | | 1800 | Only videos shorter than 30 minutes | | 3600 | Only videos shorter than 1 hour |

Add more subscriptions by creating additional JSON files:

$ touch ~/.subscribe-you-tube-channel/subscriptions/another-playlist.json
$ vim ~/.subscribe-you-tube-channel/subscriptions/another-playlist.json

Usage

$ subscribe-you-tube-channel -C ~/.subscribe-you-tube-channel -Y /usr/bin/yt-dlp

Options

$ subscribe-you-tube-channel -h
subscribe-you-tube-channel

Download videos from subscribed playlists
Usage: subscribe-you-tube-channel [options]

Commands:
  subscribe-you-tube-channel init  Initialize the working directory
  subscribe-you-tube-channel       Download videos from subscribed playlists               [default]

Options:
  --version                 Show version number                                            [boolean]
  -C, --directory           Specify the working directory
                                                                          [string] [default: <$CWD>]
  -o, --download-directory  Specify the download directory
                                                                [string] [default: <$CWD/downloads>]
  -Y, --yt-dlp-bin          Specify the path to yt-dlp binary                    [string] [required]
  -q, --quiet               Do not output to stdout or stderr             [boolean] [default: false]
  -h, --help                Show help                                                      [boolean]

Examples:
  subscribe-you-tube-channel -C ~/.subscribe-you-tube-channel -o ~/Videos -Y /usr/bin/yt-dlp

Run from crontab

$ sudo crontab -e

Insert the following (adjust paths and schedule):

min hr1,hr2 * * * /bin/bash -l -c '. "/home/pi/.nvm/nvm.sh" && subscribe-you-tube-channel -C /home/pi/.subscribe-you-tube-channel/ -o /home/pi/Downloads/YouTube/ -Y /home/pi/.local/bin/yt-dlp --quiet >/dev/null 2>&1'