No description
Find a file
2021-06-04 13:03:05 -07:00
frontends Turn off hotkeys.js logging every press. 2021-06-04 13:03:05 -07:00
utilities Rename import bot -> youtube_credentials. 2021-04-25 18:02:26 -07:00
ycdl Log exact path of queuefile while creating it. 2021-05-24 16:21:28 -07:00
CONTACT.md Update CONTACT.md with link to voussoir.net. 2021-04-04 17:11:22 -07:00
DONATE.md Update license, contact, donate for many projects. 2021-01-14 02:46:53 -08:00
LICENSE.txt Update license, contact, donate for many projects. 2021-01-14 02:46:53 -08:00
README.md Add helpful bookmarklet to readme. 2021-04-26 17:03:24 -07:00
requirements.txt Update requirements.txt. 2021-04-04 11:17:11 -07:00
ycdl_logo.svg Add ycdl_logo.svg. 2020-01-19 10:51:54 -08:00

Youtube Channel Downloader

YoutubeChannelDownloader creates an SQLite3 database of Youtube channels and their videos, and serves it out of a web server.

YCDL solves three main problems:

Metadata archive

The database acts as a permanent archive of video metadata including title, description, duration, view count, and more. Even if a video or channel is deleted from Youtube, you will still have this information. Perfect for never losing track of unlisted videos, too.

The thumbnails, however, are not stored in the database, but you can use utilities\download_thumbnails.py to download them.

Note: At this time, refreshing a channel in YCDL will update video titles, descriptions, and view counts with their current values. If you refresh a channel after they have changed their video's title or description you will lose the previous value.

Easily watch every video on the channel

When I discover a channel, I like to watch through the videos over the course of weeks or months. Within Youtube's own interface, there is no good way to filter videos you've watched from videos you haven't. Scrolling through all of a channel's videos to find ones you haven't seen is tough.

In YCDL, videos start off as pending and you can mark them as ignore or download. The pending page always acts as your "to-watch" list.

On Youtube's subscription page, there is a button to hide a video from the list. I would often press this hide button after watching a video, only to find it come back a few days later. Don't get me started on live broadcasts or premieres -- hiding those was never reliable. YCDL makes watching my subscriptions much easier.

Send video IDs to youtube-dl

YCDL does not perform the downloading of videos itself. youtube-dl is the tool for that. When you click on the download button, it will create an empty file called xxxxxxxxxxx.ytqueue in the directory specified by the ycdl.json config file. You should create a separate shell / Python script that watches for ytqueue files and calls youtube-dl with your preferred arguments.

The reason for this is that youtube-dl is extremely configurable. Every user might prefer a completely different set of arguments and formatting. Rather than attempting to provide an interface for that in YCDL, my goal is to get you the video IDs so you can pass them into your favorite youtube-dl configuration.

Features

  • Web interface with video embeds
  • "Sub-box" page where newest videos from all channels are listed in order
  • Sort videos by date, duration, views, or random
  • Background thread will refresh channels over time
  • Automark channels as ignore or download

Your API key

You are responsible for your own youtube_credentials.py file on your PYTHONPATH, with a function get_youtube_key. YCDL will import youtube_credentials and call youtube_credentials.get_youtube_key() with no arguments. It should return a Youtube API key. Here is how to get one:

  1. Go to https://console.developers.google.com/.
  2. Create a project using the menu in the upper left.
  3. From the project's dashboard, click "Enable APIs and Services".
  4. Search for and choose the latest YouTube Data API.
  5. On the left bar, click "Credentials".
  6. Click "Create credentials" and choose "API key". In my experience they all start with "AIzaSy".
  7. Return this value from get_youtube_key however you deem fit.

Pairs well with...

Here is a javascript bookmarklet that you can click while on youtube.com to be redirected to the same URL on your YCDL server. Mainly for /channel and /watch URLs.

javascript:
document.location = document.location.href.replace('https://www.youtube.com', 'http://localhost:5000');
false;

Replace 5000 with the port on which you choose to run YCDL.

Screenshots

2020-04-04_15-27-15

2020-04-04_15-29-25

2020-04-04_15-36-05

2020-04-04_15-36-10

2020-04-04_15-40-27

To do list

  • Keep permanent record of titles and descriptions.
  • Progress indicator for channel refresh.

Mirrors

https://github.com/voussoir/ycdl

https://gitlab.com/voussoir/ycdl

https://codeberg.org/voussoir/ycdl