yt_downloader is a simple utility for downloading videos and/or audio from YouTube. It provides a command-line interface to fetch and save content locally for offline use.
It is based on the pytubefix library.
- Download full YouTube videos in the highest available resolution.
- Extract audio from YouTube videos.
- Simple and easy-to-use CLI.
- Specify the output directory for downloads.
- Cross-platform support.
- Python 3.7+
- pytubefix
Install dependencies:
pip install pytubefixClone the repository:
git clone https://github.com/e-debianchi/yt_downloader.git
cd yt_downloaderpython yt_downloader.pyYou will be prompted to:
- Enter the YouTube video URL.
- Choose whether to download the video or audio only (v for video, a for audio).
- Specify the output directory (press Enter to use the current working directory).
π Example:
Enter the YouTube video URL: https://www.youtube.com/watch?v=abcd1234
Title: Sample Video Title
Views: 1234567
Length: 210 seconds
Download (v)ideo or (a)udio only? [v/a]: a
Enter the output path (default is current directory): /Users/yourname/Downloads
Downloading to: /Users/yourname/Downloads
Download completed successfully.
- Make sure the provided URL is valid and accessible.
- Some videos may be unavailable due to regional restrictions or copyright issues.
- This tool is intended for educational and personal use only. Please respect YouTube's terms of service.