Skip to content

shubhamatkal/automate-yt-downloading-using-cron

Repository files navigation

YouTube Playlist Downloader

This project provides a script to download YouTube playlists during specific hours (12 AM to 6 AM) using unlimited data plans of VI.

Requirements

Ensure the following packages are installed on your system:

  • yt-dlp: To download YouTube videos.
  • jq: For JSON processing.
  • nmcli: To manage WiFi connections.
  • cron

Installation on Arch Linux

sudo pacman -S yt-dlp jq nmcli cron

Project Setup

Clone the repository:

git clone https://github.com/yourusername/yt-playlist-downloader.git
cd yt-playlist-downloader

Configure JSON File:

Create a yt-playlist-links.json file with your YouTube playlist URLs:

[
    "https://www.youtube.com/playlist?list=YOUR_PLAYLIST_ID",
    "https://www.youtube.com/playlist?list=ANOTHER_PLAYLIST_ID"
]

Crontab Setup

To schedule the download script and the kill script, add the following lines to your crontab:

Edit your crontab

crontab -e

Add the following cron jobs

5 0 * * * /root/cronjobs/yt-playlist-downloader/cron_job_script.sh
50 5 * * * /root/cronjobs/yt-playlist-downloader/playlist-script-name-here.sh

This setup will run the download script at 12:05 AM every day and attempt to kill the download process at 5:50 AM every day.

Video Link:

https://youtu.be/ngaNmntbmF4

About

automate youtube playlist downloading using cron, yt-dlp in linux using shell scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages