Code Monkey home page Code Monkey logo

automate-yt-downloading-using-cron's Introduction

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

automate-yt-downloading-using-cron's People

Contributors

shubhamatkal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.