Skip to content

Commit

Permalink
main
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanmanishd authored Jan 3, 2023
1 parent 81595ed commit c00968e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from pytube import YouTube
from tkinter import *
from tkinter import ttk

def download():
global entry
#Get the link from entry
videoLink= entry.get()
video = YouTube(videoLink)
video = video.streams.get_highest_resolution()
try:
video.download()
except:
label.configure(text="There has been an error in downloading!")
label.configure(text="Download is Completed.")


win= Tk()

#Set the geometry of Tkinter frame
win.geometry("750x250")

#Initialize a Label to display the User Input
label=Label(win, text="Enter Video Link Here", width=100,font=("Georgia"),height=2)
label.pack()

#Create an Entry widget to accept User Input
entry= Entry(win, width= 40,font='Arial 15')
entry.focus_set()
entry.pack(padx=10,pady=5)

#Create a Button to validate Entry Widget
ttk.Button(win, text= "Download",width= 30, command= download).pack(padx=10,pady=30)

win.mainloop()

0 comments on commit c00968e

Please sign in to comment.