Skip to content

prathamsoni-devcode/Youtube-Playlist-Downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

YouTube Playlist Downloader

This Python script downloads videos from a YouTube playlist in 1080p or the highest available resolution below 1080p, and zips them into a single file. It uses the pytube library to download videos and the python-dotenv library to load environment variables from a .env file.

Installation

  1. Clone the repository:

    git clone https://github.com/prathamsoni11/Youtube-Playlist-Downloader.git
  2. Navigate to the project directory:

    cd Youtube-Playlist-Downloader
  3. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
  4. Install the required dependencies:

    pip install pytube python-dotenv
  5. Create a .env file in the project directory and add your playlist URL and desired zip file name:

    PLAYLIST_URL=YOUR_PLAYLIST_URL_HERE
    ZIP_FILE_NAME=YOUR_ZIP_FILE_NAME_HERE
    
  6. Run the script:

    python3 script.py
  7. Once the script finishes, deactivate the virtual environment:

    deactivate

Configuration

You can customize the script by editing the .env file with your playlist URL and desired zip file name. Ensure that the PLAYLIST_URL is the URL of the YouTube playlist you want to download, and ZIP_FILE_NAME is the desired name of the zip file.

Dependencies

  • pytube - For downloading YouTube videos.
  • python-dotenv - For loading environment variables from a .env file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages