Welcome to the YouTube Downloader! This script helps you download YouTube videos or audio easily. You can choose to download videos in MP4 format or extract audio in MP3 format. It’s simple to use and works on both Linux and Windows.
-
Download Videos:
- Save YouTube videos in MP4 format.
- Videos are saved in the
Videos
folder (located in your home directory).
-
Download Audio:
- Extract audio from YouTube videos and save it as MP3.
- Audio files are saved in the
Music
folder (located in your home directory).
-
Download Playlists:
- Download entire YouTube playlists.
- Videos or audio from playlists are saved in a folder named after the playlist.
-
Organized Downloads:
- Single videos/audio are saved directly in the
Videos
orMusic
folder. - Playlists are saved in a subfolder inside the
Videos
orMusic
folder.
- Single videos/audio are saved directly in the
-
Python 3.x:
- Make sure Python is installed on your computer.
- Download it from python.org if you don’t have it.
-
yt-dlp
Library:- This is the tool the script uses to download videos and audio.
- Install it by running this command in your terminal or command prompt:
pip install yt-dlp
-
The Script (
yt.py
):- Download the script and save it to your computer.
-
Open Terminal or Command Prompt:
- On Linux: Open the terminal.
- On Windows: Open Command Prompt or PowerShell.
-
Run the Script:
- Navigate to the folder where the script is saved.
- Run the script by typing:
python yt.py
-
Follow the Prompts:
- Enter the YouTube video or playlist URL when asked.
- Choose whether you want to download Video or Audio.
-
Wait for the Download:
- The script will download the file and save it in the correct folder:
- Videos: Saved in
~/Videos
(orC:\Users\YourUsername\Videos
on Windows). - Audio: Saved in
~/Music
(orC:\Users\YourUsername\Music
on Windows).
- Videos: Saved in
- For playlists, a folder will be created with the playlist name.
- The script will download the file and save it in the correct folder:
-
Run the script:
python yt.py
-
Enter the YouTube URL:
Enter the YouTube video or playlist URL: https://www.youtube.com/watch?v=example
-
Choose download type:
Download as VIDEO or AUDIO? (Enter 'video' or 'audio'): video
-
The file will be saved in the
Videos
orMusic
folder.
- Internet Connection: A stable internet connection is required for smooth downloads.
- Folder Creation: If the
Videos
orMusic
folders don’t exist, the script will create them automatically. - Playlist Support: Playlists are downloaded into a folder named after the playlist title.