Skip to main content

A CLI tool to download YouTube Videos by giving an URL

Project description

Pytube Tool

pytube-tool is a Python-based command-line utility for downloading YouTube videos. By simply providing a YouTube video URL, users can select their preferred format and download the video efficiently.

Contents

Features | Installation | Install from PyPI | Build from Source | Usage | Example Usage | Development

Features

  • Command-Line Interface (CLI): Download YouTube videos using simple terminal commands.
  • Format Selection: Choose from available video and audio formats before downloading.
  • High-Quality Video: Supports downloading videos in resolutions such as 720p, 1080p, and higher, if available.
  • Audio-Only Downloads: Extract and download the audio portion of a video.
  • Batch Downloading: Download multiple videos using a list of URLs from a file.
  • Fast and Efficient: Optimized to download videos quickly while maintaining quality.

Installation

Option 1: Install from PyPI

To install pytube-tool directly from PyPI:

pip install pytube-tool

Option 2: Build from Source

For those who prefer to build it themselves:

  1. Clone the repository and navigate to the project directory:

    git clone https://github.com/h471x/youtube_downloader.git
    cd youtube_downloader
    
  2. Install required packages:

    pip install -r requirements.txt
    
  3. Build the package:

    python setup.py sdist bdist_wheel
    
  4. Install the package:

    pip install dist/*.whl
    

Usage

Once the package is installed, you can use the pytube command from the terminal. The script accepts the following command-line arguments:

  • Download Video:

    • Provide the URL of the YouTube video you wish to download.
  • Format Selection:

    • During the download process, the tool will list available formats (video resolutions and audio-only) and prompt you to select one.
  • Batch Processing:

    • Use a file containing a list of YouTube video URLs to download multiple videos at once.
  • Help Option:

    • -h or --help: Display the help message with all available options.

Example Usage

  1. Download a Single Video:

    pytube --url https://www.youtube.com/watch?v=example_video_id
    

    The tool will list available formats, allowing you to select your preferred option.

  2. Batch Download:

    pytube -b urls.txt
    

    urls.txt should contain one YouTube URL per line.

  3. Help Option: For help with command-line options, use:

    pytube -h
    

Development

To modify or extend the functionality, ensure you have the required dependencies installed. You can add new features or optimize existing ones as needed.

Adding New Features

  • Support for Playlists: Extend the tool to handle full playlist downloads.
  • Download Progress Indicator: Implement a visual progress bar for downloads.
  • Improved Format Filtering: Enhance format selection to include additional criteria like frame rate or bit rate.

Contributing

Feel free to fork this repository, open issues, or submit pull requests with improvements or bug fixes. Your contributions help make the pytube-tool better!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytube-tool-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

pytube_tool-0.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pytube-tool-0.1.0.tar.gz.

File metadata

  • Download URL: pytube-tool-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.7

File hashes

Hashes for pytube-tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dc2e4e5285f180f8d457f7e6943e33c5414c537f41d16678920a25c081afa455
MD5 2c14accff620f26e7be84c0e006058d6
BLAKE2b-256 a77a24e3b1e6714428d8d0acaf8493c884e9bfed642ffa7733adce2439bc4bc6

See more details on using hashes here.

File details

Details for the file pytube_tool-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytube_tool-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.7

File hashes

Hashes for pytube_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b0a75cdb14f3431e851a1f06878a914d11e72cf1531b57f2d98b9c02f6ed298
MD5 19b4ba93ece8e4f81f1fdee15dc6ce53
BLAKE2b-256 6379543affa09e0ebc8677348538910a690a672b8b4dc9265aef4d1044a6bff3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page