Skip to content

Commit 2100a3a

Browse files
committed
added Some commets and new error massage, changed font color in label top of the Entry box becouse they cont visible in white color, i changed into black color.
1 parent 8db05aa commit 2100a3a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

youtubedownloader.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from tkinter import Button, Entry, Label, Tk, filedialog, messagebox
2-
from threading import Thread
3-
from pytube import YouTube
1+
# modules for Using of app
2+
from tkinter import Button, Entry, Label, Tk, filedialog, messagebox # Gui Modules
3+
from threading import Thread # modules for multi threding
4+
from pytube import YouTube # Module for Youtube service
45

56
# this function for mulple code runes at a time
67
def threading():
@@ -22,7 +23,7 @@ def download():
2223
else:
2324
messagebox.showwarning("", "Download cancelled!")
2425
except Exception:
25-
messagebox.showerror("Error", "An error occurred while downloading the video.")
26+
messagebox.showerror("Error", "Some Thing Went Wrong!!!\nplease try again")
2627

2728

2829
# This code runes on only this file
@@ -44,13 +45,14 @@ def download():
4445
)
4546
introlable.place(x=35, y=20)
4647

47-
Label(root, text="Enter YouTube Link", font=("sans-serif", 16), bg="olivedrab1").place(
48+
Label(root, text="Enter YouTube Link", font=("sans-serif", 16), bg="olivedrab1", fg='Black').place(
4849
x=40, y=150
4950
)
5051

5152
url_box = Entry(root, font=("arial", 30), width=30)
5253
url_box.place(x=40, y=180)
5354

55+
# download button in UI
5456
btn = Button(root, text="DOWNLOAD", font=("sans-serif", 25), command=threading)
5557
btn.place(x=270, y=240)
5658
root.mainloop()

0 commit comments

Comments
 (0)