We used tkinter python library for this application below is the code for the application and output image.
from tkinter import *
from pytube import YouTube
ws = Tk()
ws.geometry('600x600')
ws.resizable(False, False)
ws.title('YouTube Video Downloader App')
label = Label(ws, text="YouTube Video Downloader",bg='cyan',font='monospace 20 bold').pack()
#put your link
link_video = StringVar()
label = Label(ws,text= 'paste your link your',font='monospace 20 bold').place(x=150, y=80)
entery_link = Entry(ws, width=70, textvariable=link_video).place(x=30, y=132)
#define a functio for downlaod
def DownloadVideo():
url = YouTube(str(link_video.get()))
video = url.streams.first()
video.download()
Label(ws, text='video downlaoded',font='arial 15 bold').place(x = 180,y=210)
Button(ws, text='Downlaod',font='arial 15',command=DownloadVideo, bg='Green').place(x=180, y= 150)
ws.mainloop()
Comments
Post a Comment