Skip to main content

How to create Youtube Downloader Python || Gui Based || Video + Audio Downloader || Python Complete Project||Swetha Selvam||2021

 Hi, Friends, this blog is about how to create Youtube Downloader Python || Gui Based || Video + Audio Downloader || Python Complete Project||Swetha Selvam||2021

It is very easy and simple to create it, just install a single package PyTube.

 click here for video tutorial

Source Code:

from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from pytube import YouTube

Folder_Name = ""

#file location
def openLocation():
global Folder_Name
Folder_Name = filedialog.askdirectory()
if(len(Folder_Name) > 1):
locationError.config(text=Folder_Name,fg="green")

else:
locationError.config(text="Please Choose Folder!!",fg="red")

#donwload video
def DownloadVideo():
choice = ytdchoices.get()
url = ytdEntry.get()

if(len(url)>1):
ytdError.config(text="")
yt = YouTube(url)

if(choice == choices[0]):
select = yt.streams.filter(progressive=True).first()

elif(choice == choices[1]):
select = yt.streams.filter(progressive=True,file_extension='mp4').last()

elif(choice == choices[2]):
select = yt.streams.filter(only_audio=True).first()

else:
ytdError.config(text="Paste Link again!!",fg="red")


#download function
select.download(Folder_Name)
ytdError.config(text="Download Completed!!")



root = Tk()
root.title("Swetha Selvam")
root.geometry("350x400") #set window
root.columnconfigure(0,weight=1)#set all content in center.

#Ytd Link Label
ytdLabel = Label(root,text="Enter the URL of the Video",font=("jost",15))
ytdLabel.grid()

#Entry Box
ytdEntryVar = StringVar()
ytdEntry = Entry(root,width=50,textvariable=ytdEntryVar)
ytdEntry.grid()

#Error Msg
ytdError = Label(root,text="Error Msg",fg="red",font=("jost",10))
ytdError.grid()

#Asking save file label
saveLabel = Label(root,text="Save the Video File",font=("jost",15,"bold"))
saveLabel.grid()

#button of save file
saveEntry = Button(root,width=10,bg="pink",fg="white",text="Choose Path",command=openLocation)
saveEntry.grid()

#Error Msg location
locationError = Label(root,text="Error Msg of Path",fg="red",font=("jost",10))
locationError.grid()

#Download Quality
ytdQuality = Label(root,text="Select Quality",font=("jost",15))
ytdQuality.grid()

#combobox
choices = ["720p","144p","Only Audio"]
ytdchoices = ttk.Combobox(root,values=choices)
ytdchoices.grid()

#donwload btn
downloadbtn = Button(root,text="Donwload",width=10,bg="red",fg="white",command=DownloadVideo)
downloadbtn.grid()

#developer Label
developerlabel = Label(root,text="Swetha Selvam",font=("jost",15))
developerlabel.grid()
root.mainloop()

Comments

Popular posts from this blog

How To Download Money Heist Sticker

 Are You Money Heist Fan?? Do you want Money Heist Sticker??.. Then Follow the instructions below to get your Sticker. No Apps Required. 1. Open Whatsapp 2. Open Your Whatsapp Chat, Click On Emoji Icon. 3. Click On Sticker Option. 4. Click on Plus Icon. To add a new Sticker. 5. Now Add Your Money Hesit Sticker. 6. Now Click And Download.....!!!!

DONT BUY ALEXA!!!... CREATE YOUR OWN USING PYTHON|PROJECT|PYCHARM|

 Any Alexa Lovers???... Then this project is for you, create your own alexa by using Python.. by using 3 simple packages we can create own voice assistant, Packages are... 1. pip speech recognition 2. pip text to speech recognition 3. pip PyAudio IMPORTANT: IN SOME SYSTEMS PYAUDUIO, INSTALLATION PROBLEM OCCURS, IN THAT CASE, CHECK YOUR PYTHON VERSION, USE PYTHON 3.6 OR ABOVE. You can search the things, playmusic, and you can ask the funny question to alexa using below code.. import speech_recognition as sr import pyttsx3 import pywhatkit import datetime import wikipedia import pyjokes listener = sr.Recognizer() engine = pyttsx3.init() voices = engine.getProperty('voices') engine.setProperty('voice', voices[1].id) def talk(text):     engine.say(text)     engine.runAndWait() def take_command():     try:         with sr.Microphone() as source:           ...

How to use COUNTIF and COUNTIFS in Microsoft Excel

In this Video You can learn How to use COUNTIF and COUNTIFS in Microsoft Excel  Topics Covered:  a) Count how many times a certain string or number appear in a list  b) Count how many times multiple items appear in a list c) Count how many items are greater than or less than a certain value  d) Count how many items are between certain values  e) Count how many items do not match certain values f) Count how many items begin or end with certain characters  g) Count how many items match certain conditions across multiple columns https://youtu.be/mdURBPoE22U