Last active
January 25, 2025 12:43
-
-
Save jonath92/039e998b3d3f6ba4afd5d5c671eaedf1 to your computer and use it in GitHub Desktop.
install-update-yt-dlp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a simple script to install yt-dlp and create a cron job to automatically update yt-dlp on a daily basis. | |
# can be executed with: | |
# sudo su -c "bash <(wget -qO- https://gist.githubusercontent.com/jonath92/039e998b3d3f6ba4afd5d5c671eaedf1/raw/12dbaa50fb1c69da7e7ab2dca546756a8ef4bb8d/install-update-yt-dlp.sh)" root | |
# install yt-dlp (see https://github.com/yt-dlp/yt-dlp#installation) | |
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp | |
sudo chmod a+rx /usr/local/bin/yt-dlp | |
# Remove apt version to prevent conflicts | |
sudo apt purge yt-dlp | |
# ytdlp requires ffmpeg | |
sudo apt install ffmpeg -y | |
# create script for daily update | |
UPDATE_PATH="/etc/cron.daily/update_yt_dlp" | |
touch ${UPDATE_PATH} | |
echo "#! /bin/sh" > ${UPDATE_PATH} | |
echo "yt-dlp -U" >> ${UPDATE_PATH} | |
chmod +x ${UPDATE_PATH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment