-
Notifications
You must be signed in to change notification settings - Fork 976
Install yt‐dlp
The youtube-dl
tool, while once popular for downloading videos from YouTube and other platforms, has seen a slowdown in updates and may not work reliably with newer changes to these platforms. As an alternative, the community has developed a more up-to-date and feature-rich tool called yt-dlp
, which is seen as an improved fork of youtube-dl
.
If you've been using youtube-dl
and have been facing issues, it's recommended to switch to yt-dlp
for a better experience.
-
Update System Repositories: Before installing any new software, it's a good practice to update the system's repositories to ensure you're accessing the latest versions of packages.
sudo apt update
-
Install yt-dlp:
yt-dlp
can be installed usingpip
, Python's package installer. If you don't havepip
installed, you can install it using the package manager:sudo apt install python3-pip
Once
pip
is installed, you can installyt-dlp
:sudo pip3 install -U yt-dlp
-
Updating yt-dlp: Since
yt-dlp
is installed viapip
, you can easily update it using the following command:sudo pip3 install -U yt-dlp
-
Open Crontab: To edit the
crontab
for the current user, use the following command:crontab -e
-
Add Daily Update Command: At the end of the file, add the following line to ensure
yt-dlp
updates every day at a specific time (e.g., 2:30 AM):30 2 * * * /usr/local/bin/pip3 install -U yt-dlp
-
Save and Exit:
- If you're using the
nano
editor (the default for many systems): PressCTRL + X
to close, then pressY
to confirm the changes, and finally pressEnter
to save. - If you're using the
vim
editor: PressEsc
, then type:wq
and pressEnter
.
- If you're using the
-
Verify the Cron Job: To make sure your new cron job has been added, you can list the crontab entries with:
crontab -l
You should see your new command in the list. This will ensure that yt-dlp
is updated daily at the specified time.
Note: The exact path to pip3
might differ based on how it was installed and your system setup. The provided path (/usr/local/bin/pip3
) is a common one. If pip3
is located elsewhere, you might need to adjust the path in the cron job accordingly. You can find the path using which pip3
.