Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Youtube Downloader Python Script

A simple command-line tool in Python to download YouTube video and audio using yt-dlp and Youtube-dl. Although yt-dlp and Youtube-dl are great tools, working with them and downloading videos can be a bit complicated. Specially when you want to download a video with a specific quality or format.

This script is a simple wrapper around yt-dlp and youtube-dl that makes it easier to download videos with specific options.

Setup

  1. Clone the repository:
    git clone https://github.com/YourUsername/yt-dl.git
    cd yt-dl
  2. Install the required Python packages:
    pip install -r requirements.txt

Usage

Run the script from your terminal, followed by the YouTube video URL you want to download.

python yt-dl.py "YOUTUBE_URL_HERE"

Example

python yt-dl.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

The script will then fetch the available formats and prompt you to enter the number corresponding to your desired quality.

$ youtube downloader % python yt-dl.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Enter the path to save the video (default: Downloads directory): 

Available formats:
--------------------------------------------------------------------------------
Format ID  Extension  Resolution           File Size       Description         
--------------------------------------------------------------------------------
sb3        mhtml      48x27                N/A             storyboard          
sb2        mhtml      80x45                N/A             storyboard          
sb1        mhtml      160x90               N/A             storyboard          
sb0        mhtml      320x180              N/A             storyboard          
233        mp4        audio only           N/A             Default, low        
234        mp4        audio only           N/A             Default, high       
249        webm       audio only           1.17 MB         low                 
250        webm       audio only           1.55 MB         low                 
140        m4a        audio only           3.29 MB         medium              
251        webm       audio only           3.27 MB         medium              
602        mp4        256x144              N/A             N/A                 
269        mp4        256x144              N/A             N/A                 
160        mp4        256x144              5.25 MB (video+audio) 144p                
603        mp4        256x144              N/A             N/A                 
278        webm       256x144              5.13 MB (video+audio) 144p                
394        mp4        256x144              4.77 MB (video+audio) 144p                
229        mp4        426x240              N/A             N/A                 
133        mp4        426x240              7.40 MB (video+audio) 240p                
604        mp4        426x240              N/A             N/A                 
242        webm       426x240              6.53 MB (video+audio) 240p                
395        mp4        426x240              6.23 MB (video+audio) 240p                
230        mp4        640x360              N/A             N/A                 
134        mp4        640x360              11.22 MB (video+audio) 360p                
18         mp4        640x360              11.21 MB        360p                
605        mp4        640x360              N/A             N/A                 
243        webm       640x360              10.85 MB (video+audio) 360p                
396        mp4        640x360              8.60 MB (video+audio) 360p                
231        mp4        854x480              N/A             N/A                 
135        mp4        854x480              16.63 MB (video+audio) 480p                
606        mp4        854x480              N/A             N/A                 
244        webm       854x480              13.82 MB (video+audio) 480p                
397        mp4        854x480              12.42 MB (video+audio) 480p                
232        mp4        1280x720             N/A             N/A                 
136        mp4        1280x720             28.34 MB (video+audio) 720p                
609        mp4        1280x720             N/A             N/A                 
247        webm       1280x720             23.38 MB (video+audio) 720p                
398        mp4        1280x720             19.89 MB (video+audio) 720p                
270        mp4        1920x1080            N/A             N/A                 
137        mp4        1920x1080            79.98 MB (video+audio) 1080p               
614        mp4        1920x1080            N/A             N/A                 
248        webm       1920x1080            39.51 MB (video+audio) 1080p               
399        mp4        1920x1080            32.69 MB (video+audio) 1080p               
616        mp4        1920x1080            N/A             Premium             
620        mp4        2560x1440            N/A             N/A                 
271        webm       2560x1440            147.37 MB (video+audio) 1440p               
400        mp4        2560x1440            115.12 MB (video+audio) 1440p               
625        mp4        3840x2160            N/A             N/A                 
313        webm       3840x2160            345.24 MB (video+audio) 2160p               
401        mp4        3840x2160            230.51 MB (video+audio) 2160p               
--------------------------------------------------------------------------------

After you make a selection, the download will begin automatically.

About

A simple python script for downloading YouTube video in desired format and quality.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages