Skip to main content

A simple YouTube video downloader using yt_dlp

Project description

WaveYT

WaveYT is a simple Python package for downloading YouTube videos using yt-dlp. Designed for developers and general users alike, WaveYT makes downloading videos straightforward and efficient.

Features

  • Downloads YouTube videos in the best available video and audio format.
  • Saves the downloaded video with its title as the filename.
  • Easy-to-use command-line interface (CLI).

Installation

To install WaveYT, simply use pip:

pip install WaveYT

How to Use

Here is an example of how to use WaveYT in Python:

import yt_dlp

def download_youtube_video():
    # Get the YouTube link from the user
    video_url = input("Enter the YouTube video URL: ")

    # Define download options
    ydl_opts = {
        'format': 'best',  # Best video+audio format
        'outtmpl': '%(title)s.%(ext)s',  # Save file as the video's title
    }

    try:
        # Download the video
        with yt_dlp.YoutubeDL(ydl_opts) as ydl:
            info = ydl.extract_info(video_url, download=True)
            print(f"Downloaded: {info['title']}")
    except Exception as e:
        print("Error:", e)

if __name__ == "__main__":
    download_youtube_video()

You can now copy and paste this code to use WaveYT effortlessly!

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

waveyt-0.1.2.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

WaveYT-0.1.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file waveyt-0.1.2.tar.gz.

File metadata

  • Download URL: waveyt-0.1.2.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for waveyt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e9ca6eb14a41643fda21ea51f21fd615214bea3552923baa56337e22e56855b9
MD5 32994131eafa75f87f3d6bc8495891e8
BLAKE2b-256 78a339516c6cc3bb2cfb8a0ebcdf82ba2a2c9149fcf0f973018d3861d8e00468

See more details on using hashes here.

File details

Details for the file WaveYT-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: WaveYT-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for WaveYT-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f01fbee43e09aeab46d2475eaa07a4fe80882f7e8b147b280fad94cf63d66b9d
MD5 c4d2bc257bb03439a9666255f50dbe8a
BLAKE2b-256 e3acb6d97f424972e7d52df6b5529fd24ca131d21ba4a10cf12c03731b7be9a7

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