-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
25 lines (20 loc) · 856 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#import the tkinter the standard GUI library in python
from tkinter import *
from pytube import YouTube
root = Tk()
root.geometry('500x300')
root.resizable(0, 0)
root.title("youtube video downloader-Pro")
Label(root, text='Youtube Video Downloader', font='arial 20 bold').pack()
#enter the link of the video that you want to download
link = StringVar()
Label(root, text='Paste Link Here:', font='arial 15 bold').place(x=160, y=60)
link_enter = Entry(root, width=70, textvariable=link).place(x=32, y=90)
# function used to download video
def Downloader():
url = YouTube(str(link.get()))
video = url.streams.first()
video.download()
Label(root, text='DOWNLOADED', font='arial 15').place(x=180, y=210)
Button(root, text='DOWNLOAD', font='arial 15 bold', bg='pale violet red', padx=2, command=Downloader).place(x=180,y=150)
root.mainloop()