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.1.tar.gz (183.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytube_tool-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytube-tool-0.1.1.tar.gz
  • Upload date:
  • Size: 183.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pytube-tool-0.1.1.tar.gz
Algorithm Hash digest
SHA256 69af6d5eeeae432c344e4d649764349acc6a584148d385956b12ad72d3eb5ab8
MD5 32884c79cdd5d98b733370a485af25b6
BLAKE2b-256 8e654f6b707a07d086cd148ca6f24e7ddcf5044e8f4d7fe521edb037d8d85140

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytube_tool-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pytube_tool-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8597c1e248004325ea6b21776fe238764efd390d304afdeeffa95baf9071d1a1
MD5 2bdc1a8ee13dd4c1c5ba38f8d1de8daa
BLAKE2b-256 9da309d7fc2a5916e66f5f3b27d30becc1f859122a5b17b66b8ea15da12a5182

See more details on using hashes here.

Supported by

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