Skip to content

Commit 7dfdc56

Browse files
Merge pull request Aashishkumar123#14 from adiyaksabackend/patch-1
[Python] Change Resolution Video, Youtube Video Downloader
2 parents f80375d + 290acf9 commit 7dfdc56

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

Advance Youtube Downloader/yt-downloader.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# =================== PASSED ===========================
2+
# Fix Resolution Software Youtube Video Downloader
3+
# Add someone variabel in video downloader
4+
# And pop up show messagebox download started
5+
# ======================================================
6+
7+
8+
19
# ================= Importing Modules ===================
210
from tkinter import *
311
import tkinter as tk
@@ -45,15 +53,17 @@ def download_video(self):
4553
elif self.video_path.get() == "":
4654
messagebox.showerror("Error","Please provide Path")
4755
else:
48-
try:
49-
56+
# try:
57+
# Just fix resolution video and add variabel in video downloader
58+
# And create messagebox show info download started.
5059
self.url = self.video_url.get()
5160
self.path = self.video_path.get()
52-
self.video = YouTube(self.url)
53-
self.stream = self.video.streams.filter(only_audio=False).first()
54-
print("download started",self.video.title)
55-
56-
print("download completed",self.video.title)
61+
self.video = YouTube(self.url).streams
62+
self.stream = self.video.filter(
63+
file_extension="mp4", res="720p",
64+
only_audio=False
65+
).first()
66+
messagebox.showinfo("Information Download Video", "Download Started Just Wait Pop Up Show For Done Download Video.")
5767

5868
self.root = tk.Tk()
5969
self.root.geometry('300x150')
@@ -83,17 +93,17 @@ def download_video(self):
8393

8494
self.dow_details = ScrolledText(self.root,width=30,height=3,font=('verdana',8,'bold'))
8595
self.dow_details.place(x=20,y=70)
86-
self.dow_details.insert(END,f'{self.video_path.get()}\n {self.video.title}')
96+
self.dow_details.insert(END,f'{self.video_path.get()}')
8797

8898
self.dow_success = Label(self.root,text="Video downloaded successfully .....",fg="red",font=('verdana',10,'bold'),bg="white")
8999
self.dow_success.place(x=10,y=120)
90100

91101
self.root.mainloop()
92102

93103

94-
except:
95-
time.sleep(10)
96-
messagebox.showerror("Error","Unable to Download Video | Something went wrong !!")
104+
# except:
105+
# time.sleep(10)
106+
# messagebox.showerror("Error","Unable to Download Video | Something went wrong !!")
97107

98108
# ========================= End ==============================
99109

0 commit comments

Comments
 (0)