Subscribe to Youtube channels via RSS
Project description
Aldemsubs
Aldemsubs is a command line application to subscribe to Youtube channels and automatically download videos. It provides a way to keep track of channels without the need of a Youtube account. It stores channel and video information in a database and automatically updates them based on the RSS feed Youtube provides for every channel.
Aldemsubs works on GNU/Linux and MacOS (only tested on Mojave). It should also be compatible with Windows, this is not thoroughly tested however.
Installation
pip install --user aldemsubs
For user installation make sure that ~/.local/bin/
is in your $PATH
.
Usage
Subscribe to a channel:
aldemsubs -s <channel id>
In most cases the channel id is just part of the URL to a channel page. If that is not the case it can be found by examining the source code of the channel page. The most reliable way to find a channel id is by searching for "rss" in the page source. This will take you to the RSS-Link of the channel, which contains the channel id.
Unsubscribe from a channel:
aldemsubs -r <channel id>
Removes the channel and video data from the database. Downloaded videos will not be deleted.
List subscriptions:
aldemsubs -l
Lists channel id and title of all subscribed channels.
Update all subscriptions:
aldemsubs -u
This loads the current version of the RSS-feed for each channel and adds new videos to the database.
Download newly added videos:
aldemsubs -d
Downloads all new videos to the directory set in the configuration file. By
default videos are downloaded to ~/Youtube
.
Delete old videos:
aldemsubs -x
Deletes all video files older than a set amount of days (with respect to the download date not publication date).
Configuration
Default configuration:
[aldemsubs]
# Videos will be downloaded to this folder (download_path/channel_title/video).
download_path = ~/Youtube/
# Where the database is stored
db_file_path = ~/Youtube/aldemsubs.sqlite
# A video marked as new will be downloaded by aldemsubs -d (see usage). This
# setting controls after how many days the new flag is removed by aldemsubs -u.
# This only matters if you frequently update the database without downloading
# videos
mark_videos_old_after = 5 # days
# Controls for how many days to keep a video file after download. Videos older
# than this will be removed by aldemsubs -x
delete_downloads_after = 5 # days
# How many videos should be marked as new / for download after you subscribe to
# a channel? Set this to a negative number to download all videos in the RSS
# feed (usually Youtube only lists the last 15 videos in the feed)
after_subscribe_download_n_videos = 3
Changes to the configuration can be stored in ~/.config/aldemsubs.ini
.
systemd service and timer
To update your subscriptions and download new videos you can install a systemd
service and timer. Find installation scripts in this repo under
systemd/install_service.sh
and systemd/install_timer.sh
. Please read the
scripts before executing them and adjust them to your liking.
Don't forget to systemctl enable aldemsubs.timer
after installation.
The service and the timer are incompatible with MacOS and Windows.
Windows compatibility
Aldemsubs should work on Windows. However, as of now, some of my tests do not run properly on Windows (For more details take a look at the issues).
If you want to try running aldemsubs on Windows inspite of that, the command is
python -m aldemsubs
. All the options are the same. User configuration should
be stored at %APPDATA%\aldemsubs\aldemsubs.ini
and the default download
directory is %USERPROFILE%\Youtube\
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aldemsubs-0.1.3.tar.gz
.
File metadata
- Download URL: aldemsubs-0.1.3.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 154dcb2c67becec87e0ac2afeef6347dca3fad02971684c21da118c34e3e8c05 |
|
MD5 | 7431849059b7b1d292c5908e8a302bd4 |
|
BLAKE2b-256 | 7ba35d661b29a50837fd141ec503fd424a4d122181ce99502c74fa7aebcf8e93 |
File details
Details for the file aldemsubs-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: aldemsubs-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7b8a443e0d058cfe274ed5da96970fc56c5fca464f1ed1c23c4251fb8ba9f03 |
|
MD5 | 3bbaeeefa497f947c5d3fd29c355f166 |
|
BLAKE2b-256 | db5bcd51b796bbe9a3763788461828b24c7c3ec211f10aee91a98d5980edb215 |