-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
32 lines (26 loc) · 1 KB
/
Copy pathscript.py
File metadata and controls
32 lines (26 loc) · 1 KB
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
26
27
28
29
30
31
32
from tkinter import *
from turtle import heading
from pytube import YouTube as yt
app=Tk()
app.geometry('800x400')
favicon=PhotoImage(file="C:\programmationcourses\python\Tkinter\youtubevideo\images\icon.png")
app.iconphoto(False,favicon)
app.title('Youtube MP4 DOWNLOADER')
Heading=Label(app,text="Enter The Video Link here ⬇",font=("Poppins",30),fg='red')
Heading.pack()
text=StringVar()
text.set('Enter the video Url')
url = Entry(app,width=100,textvariable=text,font=("Poppins",15))
url.pack(pady=10)
def mainfun():
urltext=url.get()
my_video=yt(urltext)
for stream in my_video.streams:
print(stream)
my_video = my_video.streams.get_highest_resolution()
my_video.download(output_path="C:\programmationcourses\python\Tkinter\youtubevideo\\videos")
text1=Label(app,text="Vous avez Telechargé "+"//"+str(my_video.title)+"//")
text1.pack()
btn=Button(app,text="Download the video",fg="white",bg="red",pady=10,font=("Poppins",12),command=mainfun)
btn.pack(pady=20)
app.mainloop()