Mini Project : YouTube video downloader using Python

 


In this Mini Project, we are gonna create a Python program that can download YouTube videos !

Basically it asks to input the video link to be downloaded, searches for the highest audio and video quality of the video, asks us where to save the file and Download it to that particular location we specified.

Concepts used in this code:-

  • Pytube Module
  • Tkinter Module
  • define attribute
Code:-

from pytube import YouTube from tkinter import Tk from tkinter.filedialog import askdirectory def get_directory(): global destination root = Tk() root.withdraw() destination = askdirectory() root.destroy() link = input('Enter the video link to be downloaded: ') get_directory() yt = YouTube(link) video = yt.streams.first() print("Downloading "+yt.title+' on '+destination) video.download(destination)

Demo:-




Comments

Popular Posts