🎯 Key Takeaways for quick navigation: 00:00 *🎬 Introduction to Python GUI Project* - Introduction to creating a modern GUI project in Python for downloading UA-cam videos. 01:49 *🐍 Setting Up Python Environment* - Instructions for setting up Python environment, including installation of required packages like tkinter and Pytube. 04:08 *🖥️ Designing the User Interface* - Designing the GUI layout using tkinter, specifying frame size, title, labels, and entry for input. 06:18 *⚙️ Implementing Basic Functionality* - Implementing basic functionality such as fetching input, creating a function to handle download requests, and displaying download status. 16:51 *📈 Adding Additional Functionality* - Enhancing the user experience by updating UI elements dynamically, displaying download progress, and handling errors gracefully. 21:45 *🔄 Adding Progress Bar* - Optional addition of a progress bar to the GUI for visualizing the download progress of UA-cam videos. 22:10 *📊 Displaying Progress Percentage* - Implementing a label to display the progress percentage during video download. - Creation of a progress bar widget for visual representation of download progress. 23:49 *🛠️ Implementing Download Progress Functionality* - Defining a callback function to track download progress using Pytube's callback feature. - Accessing information such as total file size and bytes downloaded to calculate the download percentage. - Updating the progress label and progress bar dynamically during the download process. 28:03 *📚 Additional Resources and Conclusion* - Encouragement to explore further customization and functionality using tkinter. - Reference to custom tkinter documentation for more advanced features and examples. - Invitation for feedback, suggestions, and potential enhancements like video quality selection. Made with HARPA AI
I spent half a day messing around with Tauri / Vue trying to figure out how to customize the GUI and in half an hour I had this working as demonstrated and had expanded it out with extra functionality. This is an awesome vid and so much simplier with an interface that still looks super clean and modern. I'd heard mention of tkinter before when I was looking into and experimenting with PyQt, but you've sold me on it. Can't wait to check out your other and more recent videos!
Great tutorial man. Kudos!. I was unable to downloaded a couple videos (yours included and another from Rick Beato) and entered a question here to see if anyone else have the same issue. And then tried a few more videos and voilà, it worked as expected! Thanks so much for sharing this with us. I learnt a lot from it. cheers!
first i found out about pytube and decided to combine it with tkinter in a project. than i was told that there is already a website that does the same thing i wanted to create. now i find out that there is already a tutorial on how to build such a project. at this point i'm dead inside...
Thank you so much for this amazing tutorial. I had a class project and I had no idea how to make a progress bar for a downloader?!!!! and I'm not good at understanding documentations so this video saved me 💚
This is AMAZING! Just one minor (really nit thing) - PEP8 for python doesn't indicate the usage of camel case for functions, snake case should be used there (start_download(), for example)
Hey, thank you so much! this is the best UA-cam tutorial for a download i found. I tried about 8 different tutorials but this is by far the best! Could you perhaps show us how to implement a folder selection too? i would love to chose where i download my files! :) Big thanks for the video!
which IDE are you using and how did you get your IDE to work??? I graduated from computer science college, and I still can't get my IDEs to work at home, for like any language, I always have compiler problems, or framework problems, or I can't include some libraries, I'm tired T_T
Loved this one, will try to implement a launcher for an online game and see how it goes... I am curious to know if I will be able to make it work by downloading the version updates of the files. can't wait to see more content like this one.
Its been a while me learning to code. Now I was learning Tkinter. I want to create a hospital management software But i am not able to make so , Any suggestions! 😊
Great video, but i am stuck. I have followewd the instructions but my video is not downloading and i get both print messages. link invalid and download complete.
So I really like this and I followed the video step by step and it works great, except... it doesn't show the progress bar or percentage rising while running the code. In fact the whole console goes unresponsive until the download is complete After it's complete everything updates and shows as one would expect but it's not running while the download is progressing. Do you know of any fix to this?
I'm struggling with this also. What I found is that you have to use threading. Which I have done but it still doesn't work. Only thing that threading helps with is stop the freezing of the GUI. Still not getting any progress.. I don't know if it's Pytube that has a bug or it's my code
@@nicow6975 it stops and comes back, i tried a small video and it went from 0 to 100 also once it works if you try downloading a large video like this specifc video it gave progress
Ok so our gorgeous teacher on the internet is going to teach us Python too? That sounds interesting and exciting. Hopefully you will release a real world project in Python soon. 🙏🙏🙏
(Pin this) if you had any problem when you installed pytube , tkinter or custumtkinter in the integrated terminal or any terminal , please restart vs code after installation. I had to go on reddit posts and panic!
'pip install tkinter' command doesn't work for me. Googled and it says use 'pip install tk' - I wonder why this is? Edit: Figured it out. The error said 'ModuleNotFoundError: No module named 'packaging'' - just did a 'pip install packaging' and it worked!!
yoooooo i learned web front-end developement from you long ting time ago,and here we are learning again from the best.i missed learning from you.10/10 from now❤❤❤❤❤❤
When i try to click download it give me this error: "Error while downloading: get_throttling_function_name: could not find match for multiple You may need to update pytube or use an alternative."
Tip: Don't name your file "main". It is a no no in python. Internally, the python program in memory is named "main" also. You can see this in code if __name__ == "__main__" At the very least it might cause confusion.
same, not sure if the pytube library is outdated Found the fix, Pytube is the problem, its using an outdated library, therefore you need to use ytdlp, and fix the code: import tkinter import customtkinter from yt_dlp import UA-camDL def start_download(): yt_dlp_link = link.get() if not yt_dlp_link.strip(): print("Error: The URL cannot be empty.") return try: # Configuration for UA-camDL ydl_opts = { 'format': 'best', 'outtmpl': '%(title)s.%(ext)s' } with UA-camDL(ydl_opts) as yt_dlp_object: yt_dlp_object.download([yt_dlp_link]) print("Download Complete!") except Exception as e: print("Error:", e) # System settings customtkinter.set_appearance_mode("System") customtkinter.set_default_color_theme("blue") # Our app Frame app = customtkinter.CTk() app.geometry("720x480") app.title("UA-cam Downloader") # Adding UI Elements title = customtkinter.CTkLabel(app, text="Insert a youtube link") title.pack(padx=10, pady=10) # Link input url_var = tkinter.StringVar() link = customtkinter.CTkEntry(app, width=350, height=40, textvariable=url_var) link.pack() # Download button download = customtkinter.CTkButton(app, text="Download", command=start_download) download.pack(padx=10, pady=10) # Run app app.mainloop() This should get it to work.
Where can I get inspo for clean modern UI's I can't seem to look up on yt cuz it gives random stuff that doesn't fit the description of what I'm trying to look for😭
Love this tutorial! How would you make the progress bar go back to 0% on a new link being inputted so that when you press download with the new link it will update?
write in the top of function start_downloading label_finish.configure(text="") bar_Progress.set(0) label_Progress.configure("0 %") for reset title and progress
hi this tutorial is amazing and it also worked for me but i just wanted to ask you if you can make another tutorial with all the same things in this tutorial but just adding a resolution buttons with different resolution
ytObject.streams.get_by_resolution("INSERT YOUR DESIRED RESOLUTION HERE") instead of ytObject.streams.get_highest_resolution(). You can combine it with a DropDown button to select your resolution instead of a regular button for example.
great video! now we don't have to pay google for a video!! i have to ask, where is the file saved? i'm brand new to this so that should be a part of the code
Good morning, Very good video and very informative, I tried to copy the code, but I have a lot of problems following the writing. would it be possible to give me a link where i could download the source code. Thank you in advance for your understanding. Yannick
Mine is saying downloaded but I can't find the video anywhere on my computer. I don't know what I would be doing wrong. Would I not have to code into the program a folder destination?
i have the same problem, so i searched it on google. google says this: "The original pytube library no longer works, so we need to use the pytube3 library, which only works with Python3 and not with Python2"
Are you running in IDLE or VS Code? For some reason - when I ran in VS Code- as he does in his video - it implements completely accurate. I pored over the code and wrote down the code line by line on paper and compared with what he typed in the video. Realized today - that he used VS Code terminal and I ran it from IDLE when I ran from IDLE the app works - it downloads but the GUI doesn't operate completely accurately like the progress bar didn't update it was shown but showed complete at the end try VS Code to run - it should work?
I dont get any errors with this code, however, its says invalid link AND download complete and there is no sign of the video. I have checked several folders for it but assume it just didnt come down after several attempts.
trying to follow this in Nov 2024, I keep getting HTTP Error 400 Bad Request. Fixed it by installing pytubefix instead of pytube. Everything else is the same.
saves in your default Python folder which is where Python lives on your computer. there's probably a way to change the directory to one you create left this project on hold - so haven't managed to do that myself yet
I have customtkinter installed and updated, but yet it says I dont. So I cant run the code. Anyone else with the same problem? ModuleNotFoundError: No module named 'customtkinter'
hi sorry for the late response! yes if you are running it on Windows 10 or 11 through WSL using Ubuntu you are gonna have a tough time getting this up and going
Can anyone describe to me why: running the same code in MS VS Code terminal leads to a more accurate result? When I ran the same exact code from the IDLE interface-- the GUI Window - didn't update the progressbar in real time. The video downloaded - but the progress bar didn't implement in real time on the GUI. When I run it in MS VS Code- it works exactly the same as developedbyed's video. I didn't change anything with the code. spent hours and hours looking at it - couldn't figure out why. then watched the video again today - and realized he's using VS Code - and I didn't run it from VS Code. Shouldn't the result be the same?
@@Ineedsumrandom hello there! Missed this I was trying to figure that out --let my projects sit on the back burner for about 3-4 weeks now maybe you have already found out will add the answer here -- when I figure it out I am guessing though -- you have to specify the PATH you can find the PATH of the generic Python directory - where the Python program lives and then copy and paste that PATH and then - from there --- store that in some variable and switch - to the PATH_new you want. don't quote me though stuck cleaning the garage atm
Having an issue where the .streams method isn't being recognized in VS code for some reason. When I try to download a yt link, I get both the invalid error and download complete to print out to terminal, but there's no file downloaded. Wondering why the .stream method isn't being recognized. Any ideas/help is appreciated! Otherwise, easy to follow video and it was nice to see the errors come up so it can help newbies like myself get the ropes.
Found my issue, forgot the s somehow in streams when I kept thinking it was there. I think it also helped that I restarted VS code and updated PowerShell to the latest version so IntelliSense pulled the method up.
I got problem please anyone help me out. The problem is that whenever I try to download any video and click on download button the program sops responding
if it doesn,t work type: import tkinter as tk from tkinter import messagebox import customtkinter as ctk import yt_dlp import threading def startDownload(): def download(): try: ytLink = link.get() if not ytLink: messagebox.showwarning("Warning", "Please enter a valid UA-cam link.") return ydl_opts = { 'format': 'best', # Download the best available quality 'outtmpl': '%(title)s.%(ext)s', # Save file with the video title 'merge_output_format': 'mp4', # Ensure the output is in mp4 format } print("Starting download...") with yt_dlp.UA-camDL(ydl_opts) as ydl: ydl.download([ytLink])
messagebox.showinfo("Success", "Download complete!") except Exception as e: print(f"Error: {e}") # Print error for debugging messagebox.showerror("Error", f"An unexpected error occurred: {e}") finally: download_button.configure(state=tk.NORMAL) # Re-enable the button download_button.configure(state=tk.DISABLED) # Disable the button to prevent multiple clicks threading.Thread(target=download).start() # SYSTEM SETTINGS ctk.set_appearance_mode("System") ctk.set_default_color_theme("blue") # APP FRAME app = ctk.CTk() app.geometry("720x480") app.title("UA-cam DOWNLOADER") # ADDING UI ELEMENTS title = ctk.CTkLabel(app, text="Insert a UA-cam link") title.pack(padx=10, pady=10) # LINK INPUT url_var = tk.StringVar() link = ctk.CTkEntry(app, width=350, height=40, textvariable=url_var) link.pack(padx=10, pady=10) # DOWNLOAD BUTTON download_button = ctk.CTkButton(app, text="DOWNLOAD", command=startDownload) download_button.pack(padx=10, pady=10) # RUN APP app.mainloop()
🎯 Key Takeaways for quick navigation:
00:00 *🎬 Introduction to Python GUI Project*
- Introduction to creating a modern GUI project in Python for downloading UA-cam videos.
01:49 *🐍 Setting Up Python Environment*
- Instructions for setting up Python environment, including installation of required packages like tkinter and Pytube.
04:08 *🖥️ Designing the User Interface*
- Designing the GUI layout using tkinter, specifying frame size, title, labels, and entry for input.
06:18 *⚙️ Implementing Basic Functionality*
- Implementing basic functionality such as fetching input, creating a function to handle download requests, and displaying download status.
16:51 *📈 Adding Additional Functionality*
- Enhancing the user experience by updating UI elements dynamically, displaying download progress, and handling errors gracefully.
21:45 *🔄 Adding Progress Bar*
- Optional addition of a progress bar to the GUI for visualizing the download progress of UA-cam videos.
22:10 *📊 Displaying Progress Percentage*
- Implementing a label to display the progress percentage during video download.
- Creation of a progress bar widget for visual representation of download progress.
23:49 *🛠️ Implementing Download Progress Functionality*
- Defining a callback function to track download progress using Pytube's callback feature.
- Accessing information such as total file size and bytes downloaded to calculate the download percentage.
- Updating the progress label and progress bar dynamically during the download process.
28:03 *📚 Additional Resources and Conclusion*
- Encouragement to explore further customization and functionality using tkinter.
- Reference to custom tkinter documentation for more advanced features and examples.
- Invitation for feedback, suggestions, and potential enhancements like video quality selection.
Made with HARPA AI
I spent half a day messing around with Tauri / Vue trying to figure out how to customize the GUI and in half an hour I had this working as demonstrated and had expanded it out with extra functionality. This is an awesome vid and so much simplier with an interface that still looks super clean and modern. I'd heard mention of tkinter before when I was looking into and experimenting with PyQt, but you've sold me on it. Can't wait to check out your other and more recent videos!
Great tutorial man. Kudos!.
I was unable to downloaded a couple videos (yours included and another from Rick Beato) and entered a question here to see if anyone else have the same issue. And then tried a few more videos and voilà, it worked as expected!
Thanks so much for sharing this with us. I learnt a lot from it.
cheers!
yes it dint download
first i found out about pytube and decided to combine it with tkinter in a project. than i was told that there is already a website that does the same thing i wanted to create. now i find out that there is already a tutorial on how to build such a project. at this point i'm dead inside...
It's okay if you are trying to make something that's already available, it's a good feeling building something on your own and seeing it work.
@@prohubbetaespecially when you have specific interests that deviate from the project and troubleshoot your own code
What is the website name ?
You should still try, what if your one is better and faster.
I feel the same
Thank you so much for this amazing tutorial. I had a class project and I had no idea how to make a progress bar for a downloader?!!!! and I'm not good at understanding documentations so this video saved me 💚
This is AMAZING! Just one minor (really nit thing) - PEP8 for python doesn't indicate the usage of camel case for functions, snake case should be used there (start_download(), for example)
New sub here! I wrote an script that uses pytube w/ no GUI. This tutorial provided a great start to taking the app to the next level. Well done, mate!
Hey, thank you so much! this is the best UA-cam tutorial for a download i found. I tried about 8 different tutorials but this is by far the best!
Could you perhaps show us how to implement a folder selection too? i would love to chose where i download my files! :) Big thanks for the video!
which IDE are you using and how did you get your IDE to work???
I graduated from computer science college, and I still can't get my IDEs to work at home, for like any language, I always have compiler problems, or framework problems, or I can't include some libraries, I'm tired T_T
hes using Visual Studio Code.
I have not rebuilt it yet, but really amazing. :) I would use pyinstaller as well to create an executable
That wont work as expected. Windows will detect it as a virus so is useless, to be honest
Loved this one, will try to implement a launcher for an online game and see how it goes... I am curious to know if I will be able to make it work by downloading the version updates of the files. can't wait to see more content like this one.
Its been a while me learning to code. Now I was learning Tkinter. I want to create a hospital management software But i am not able to make so , Any suggestions!
😊
@@GultReverz4.0 Break it up into parts or use cases... build pieces as components...
@@kevinison3740 broi need guidance in my intermediate level of programming , can we come in contact?
@@kevinison3740 I am quite intermediate in my programming journey, need some contact , could we come in contact?
those who face promblem to install tkinter you can also run this command =>> pip install tk then can import ==> import tkinter as tk
27:35 you don't need to convert percentage_of_completion to float since it's already a float
Yes !, nice to see Python content in your channel 🙂
More to come!
@@developedbyed great 😎😎
Great video, but i am stuck. I have followewd the instructions but my video is not downloading and i get both print messages. link invalid and download complete.
Same!!
Same
Keep exploring at brilliant.org/developedbyed/. Get started for free, and hurry-the first 200 people get 20% off an annual premium subscription.
Didnot know Jack Dorsey had youtube channel
Do more python content please !!
Hey, kindly provide us with the source code. Great video 👍
So I really like this and I followed the video step by step and it works great, except... it doesn't show the progress bar or percentage rising while running the code. In fact the whole console goes unresponsive until the download is complete After it's complete everything updates and shows as one would expect but it's not running while the download is progressing. Do you know of any fix to this?
I'm struggling with this also. What I found is that you have to use threading. Which I have done but it still doesn't work. Only thing that threading helps with is stop the freezing of the GUI.
Still not getting any progress.. I don't know if it's Pytube that has a bug or it's my code
Same! @developedbyed please help!
Me too! My window just stops responding...
@@nicow6975 it stops and comes back, i tried a small video and it went from 0 to 100 also once
it works if you try downloading a large video like this specifc video it gave progress
Same, My window is stops responding
you are the king of python......................
Thanks, you solved my problem downloading videos (especially with IDM)
Ok so our gorgeous teacher on the internet is going to teach us Python too? That sounds interesting and exciting. Hopefully you will release a real world project in Python soon. 🙏🙏🙏
thanks man you solved alot of my problems like the one on 5:54
Yay! This is JUST what I was thinking of doing, but didn`t know where to start. I like :)
Edit: I made it. Really fun and satisfying project.
Can you share it? I need it for project 😭
@@shahil1867 Would you still need it?
I am planning to make this in the following days, if you interested I could send it later.
@@shahil1867
TEST here is the code actually, to test if this can be done on UA-cam.
import tkinter
import customtkinter
from pytube import UA-cam
## Something is not right here - The YT was age restricted required login
def startDownload():
try:
ytLink = link.get()
ytObject = UA-cam(ytLink, on_progress_callback=on_progress)
video = ytObject.streams.get_highest_resolution()
title.configure(text=ytObject.title, text_color="white")
finishLabel.configure(text="")
video.download()
finishLabel.configure(text="Downloaded!", text_color="white")
except:
finishLabel.configure(text="Download error", text_color="red")
#from UA-cam class from pytube
def on_progress(stream, chunk, bytes_remaining):
total_size = stream.filesize
bytes_downloaded = total_size - bytes_remaining
percentage_of_completion = bytes_downloaded / total_size * 100
per = str(int(percentage_of_completion))
pPercentage.configure(text=per + '%')
pPercentage.update()
# Update progress bar
progressBar.set(float(percentage_of_completion) / 100)
# System Settings
customtkinter.set_appearance_mode("Dark")
customtkinter.set_default_color_theme("blue")
# Our app frame
app = customtkinter.CTk()
app.geometry("720x280")
app.title("Video Downloader - UA-cam")
# Adding UI Elements
title = customtkinter.CTkLabel(app, text="Insert a youtube link")
title.pack(padx=10, pady=10)
# Link input
url_var = tkinter.StringVar()
link = customtkinter.CTkEntry(app, width=350, height=40, textvariable=url_var)
link.pack()
# Finished Downloading
finishLabel = customtkinter.CTkLabel(app, text ="")
finishLabel.pack()
# Progress percentage
pPercentage = customtkinter.CTkLabel(app, text="0%")
pPercentage.pack()
progressBar = customtkinter.CTkProgressBar(app, width=400)
progressBar.set(0)
progressBar.pack(padx=10, pady=10)
# Download button /// New function needed for startDownload
download = customtkinter.CTkButton(app, text="Download", command=startDownload)
download.pack(padx=10, pady=10)
#.........................LAST
# Run app
app.mainloop()
(Pin this)
if you had any problem when you installed pytube , tkinter or custumtkinter in the integrated terminal or any terminal , please restart vs code after installation. I had to go on reddit posts and panic!
'pip install tkinter' command doesn't work for me. Googled and it says use 'pip install tk' - I wonder why this is?
Edit: Figured it out. The error said 'ModuleNotFoundError: No module named 'packaging'' - just did a 'pip install packaging' and it worked!!
Thanks for the solution, had the same problem!
nice, i've learnt and established alot from this video.👍
Great tutorial about developing a cool looking gui in Python. Thanks
Love this. Please do more.
Nice.... need also one about PyQT, please.
Please do another video where perhaps you combine this desktop app with backend. Node backend to be specific.
Thank you for great content 👏
yoooooo i learned web front-end developement from you long ting time ago,and here we are learning again from the best.i missed learning from you.10/10 from now❤❤❤❤❤❤
When i try to click download it give me this error: "Error while downloading: get_throttling_function_name: could not find match for multiple
You may need to update pytube or use an alternative."
Tip: Don't name your file "main". It is a no no in python. Internally, the python program in memory is named "main" also.
You can see this in code if __name__ == "__main__" At the very least it might cause confusion.
I named mine as UA-camDownloader.py
Thankyou so much!! you really helped me today!!!
hey bro! what vscode theme do you use? i like it 😅
Great project 💪🏻
my program is working but the video from youtube does not download everything works but file is nowhere to be find ? can anyone help
Thank you, very useful and simple. Is it legal to deploy on my website?
Create this with NodeJs and make a video on it if possible
You are a legend Ed
not working for me ... still getting invalid link whatever I do having the same code you have.. maybe the pytube library changed ? anybody ?
same, not sure if the pytube library is outdated
Found the fix, Pytube is the problem, its using an outdated library, therefore you need to use ytdlp, and fix the code:
import tkinter
import customtkinter
from yt_dlp import UA-camDL
def start_download():
yt_dlp_link = link.get()
if not yt_dlp_link.strip():
print("Error: The URL cannot be empty.")
return
try:
# Configuration for UA-camDL
ydl_opts = {
'format': 'best',
'outtmpl': '%(title)s.%(ext)s'
}
with UA-camDL(ydl_opts) as yt_dlp_object:
yt_dlp_object.download([yt_dlp_link])
print("Download Complete!")
except Exception as e:
print("Error:", e)
# System settings
customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("blue")
# Our app Frame
app = customtkinter.CTk()
app.geometry("720x480")
app.title("UA-cam Downloader")
# Adding UI Elements
title = customtkinter.CTkLabel(app, text="Insert a youtube link")
title.pack(padx=10, pady=10)
# Link input
url_var = tkinter.StringVar()
link = customtkinter.CTkEntry(app, width=350, height=40, textvariable=url_var)
link.pack()
# Download button
download = customtkinter.CTkButton(app, text="Download", command=start_download)
download.pack(padx=10, pady=10)
# Run app
app.mainloop()
This should get it to work.
Where can I get inspo for clean modern UI's I can't seem to look up on yt cuz it gives random stuff that doesn't fit the description of what I'm trying to look for😭
Love this tutorial!
How would you make the progress bar go back to 0% on a new link being inputted so that when you press download with the new link it will update?
write in the top of function start_downloading
label_finish.configure(text="")
bar_Progress.set(0)
label_Progress.configure("0 %")
for reset title and progress
Great demo - thanks :)
Good work man
Really loved it ...!
17:00 Progress loading bar (start)
Can we specify wher the file is downloaded? Even if it is hardcoded...? I think its downloading in the project folder in this example.
Please sir make a video on making a website that generates ai images using Stable Diffusion api with python, etc 🙏🙏🙏
hi this tutorial is amazing and it also worked for me but i just wanted to ask you if you can make another tutorial with all the same things in this tutorial but just adding a resolution buttons with different resolution
ytObject.streams.get_by_resolution("INSERT YOUR DESIRED RESOLUTION HERE") instead of ytObject.streams.get_highest_resolution(). You can combine it with a DropDown button to select your resolution instead of a regular button for example.
great video! now we don't have to pay google for a video!! i have to ask, where is the file saved? i'm brand new to this so that should be a part of the code
Good morning,
Very good video and very informative, I tried to copy the code, but I have a lot of problems following the writing.
would it be possible to give me a link where i could download the source code.
Thank you in advance for your understanding.
Yannick
Your font police is really awesome! What is it please?
Mine is saying downloaded but I can't find the video anywhere on my computer. I don't know what I would be doing wrong. Would I not have to code into the program a folder destination?
Where does it download?
put a checkbox onit that can open in vlc after dl complete! that would be better and a button top open the folder the fil that dl is in!
Well done!!
Wow! Amazing content.
Please where does the video download to ?
To the folder where the code is run from.
I have a issue at 3:39 theres a error that says customtkinter does not defined ??? Can someone help pls
Im not sure why but everything works other than when i try to download a video it just says the "Download Error" and i cant get around it
i have the same problem, so i searched it on google.
google says this: "The original pytube library no longer works, so we need to use the pytube3 library, which only works with Python3 and not with Python2"
Great tut, how do i center the form on screen coz it seems not to work in custom tkinter
how can we convert this to .exe format (or installable format) and use as a normal application in any PC
pyinstaller duh
great tutorial there
Progress bar is indeed a problem, and somehow my labels as well.
Are you running in IDLE or VS Code?
For some reason - when I ran in VS Code- as he does in his video - it implements completely accurate.
I pored over the code and wrote down the code line by line on paper and compared with what he typed in the video.
Realized today - that he used VS Code terminal
and I ran it from IDLE
when I ran from IDLE the app works - it downloads
but the GUI doesn't operate completely accurately
like the progress bar didn't update
it was shown
but showed complete at the end
try VS Code to run - it should work?
By just seeing one video i was becomes yours super fan ✨
Just by reading your english, I suffered from cancer 🥲
@@gautamanand1201 bhai meri matru bhasha Hindi he English nahi 🤭
@@akshaysatav2431 python ko hindi mein kya kehte hai? 😌
@@gambomaster wahi kehte he jo tyre ko English mein kehte he 😂
what theme package do you use?
Nice tutorial
I dont get any errors with this code, however, its says invalid link AND download complete and there is no sign of the video. I have checked several folders for it but assume it just didnt come down after several attempts.
Ik its a late reply, but Pytube isnt maintained anymore and thus, doesnt work. I used yt-dlp instead
trying to follow this in Nov 2024, I keep getting HTTP Error 400 Bad Request. Fixed it by installing pytubefix instead of pytube. Everything else is the same.
Thanks, was able to build everything but I could not download the video. Well, it did download but can't find in my python directory.
Nice one bro.
is there a way to make another button wich only downloads mp3
mine says it failed and then saved and it doesnt even show in the directory!?!?!?!
saves in your default Python folder
which is where Python lives on your computer.
there's probably a way to change the directory to one you create
left this project on hold - so haven't managed to do that myself yet
1 subscribe for you to not using any background music i love it
Videos with age restrictions cannot be downloaded. How are we going to save it?
thanks man
I have customtkinter installed and updated, but yet it says I dont. So I cant run the code.
Anyone else with the same problem?
ModuleNotFoundError: No module named 'customtkinter'
hi sorry for the late response! yes if you are running it on Windows 10 or 11 through WSL using Ubuntu you are gonna have a tough time getting this up and going
"I think we have some sort of....." that is my experience with python on windows also :)
I tried using this video as the test subject for downloading, and pytube tells me it's age restricted, for some reason.
Love the python content!
It didn't work
Can anyone describe to me why:
running the same code in MS VS Code terminal leads to a more accurate result?
When I ran the same exact code from the IDLE interface-- the GUI Window - didn't update the progressbar in real time.
The video downloaded - but the progress bar didn't implement in real time on the GUI.
When I run it in MS VS Code- it works exactly the same as developedbyed's video.
I didn't change anything with the code.
spent hours and hours looking at it - couldn't figure out why.
then watched the video again today - and realized he's using VS Code - and I didn't run it from VS Code.
Shouldn't the result be the same?
I wish i knew more code.
The beauty of python .
It says Download Complete, but i cannot find the video file anywhere
I think it automatically saves into your python directory.
So wherever python default saved to on your computer.
@@mz5234 is there a way to change where it downloads too?
@@Ineedsumrandom hello there!
Missed this
I was trying to figure that out --let my projects sit on the back burner for about 3-4 weeks now
maybe you have already found out
will add the answer here -- when I figure it out
I am guessing though
-- you have to specify the PATH
you can find the PATH of the generic Python directory - where the Python program lives
and then copy and paste that PATH
and then - from there --- store that in some variable
and switch - to the PATH_new you want.
don't quote me though
stuck cleaning the garage atm
how can I change the download chunk size in pytube?? by default it is 9MB, and I want to make it less than that
Having an issue where the .streams method isn't being recognized in VS code for some reason. When I try to download a yt link, I get both the invalid error and download complete to print out to terminal, but there's no file downloaded. Wondering why the .stream method isn't being recognized. Any ideas/help is appreciated!
Otherwise, easy to follow video and it was nice to see the errors come up so it can help newbies like myself get the ropes.
Found my issue, forgot the s somehow in streams when I kept thinking it was there. I think it also helped that I restarted VS code and updated PowerShell to the latest version so IntelliSense pulled the method up.
I'm have the same issue. I tried you're solution was well.
I love it ! Thank you so much !
I got problem please anyone help me out. The problem is that whenever I try to download any video and click on download button the program sops responding
Hello i am trying to run the code but I'm getting a TypeError: Variable.trace_add() missing 1 positional argument 'callback'. Can anyone help?
same, did you fix it?
if it doesn,t work type:
import tkinter as tk
from tkinter import messagebox
import customtkinter as ctk
import yt_dlp
import threading
def startDownload():
def download():
try:
ytLink = link.get()
if not ytLink:
messagebox.showwarning("Warning", "Please enter a valid UA-cam link.")
return
ydl_opts = {
'format': 'best', # Download the best available quality
'outtmpl': '%(title)s.%(ext)s', # Save file with the video title
'merge_output_format': 'mp4', # Ensure the output is in mp4 format
}
print("Starting download...")
with yt_dlp.UA-camDL(ydl_opts) as ydl:
ydl.download([ytLink])
messagebox.showinfo("Success", "Download complete!")
except Exception as e:
print(f"Error: {e}") # Print error for debugging
messagebox.showerror("Error", f"An unexpected error occurred: {e}")
finally:
download_button.configure(state=tk.NORMAL) # Re-enable the button
download_button.configure(state=tk.DISABLED) # Disable the button to prevent multiple clicks
threading.Thread(target=download).start()
# SYSTEM SETTINGS
ctk.set_appearance_mode("System")
ctk.set_default_color_theme("blue")
# APP FRAME
app = ctk.CTk()
app.geometry("720x480")
app.title("UA-cam DOWNLOADER")
# ADDING UI ELEMENTS
title = ctk.CTkLabel(app, text="Insert a UA-cam link")
title.pack(padx=10, pady=10)
# LINK INPUT
url_var = tk.StringVar()
link = ctk.CTkEntry(app, width=350, height=40, textvariable=url_var)
link.pack(padx=10, pady=10)
# DOWNLOAD BUTTON
download_button = ctk.CTkButton(app, text="DOWNLOAD", command=startDownload)
download_button.pack(padx=10, pady=10)
# RUN APP
app.mainloop()
quick and nice
This was Very Helpful! Now I don't have to worry about any annoying ads during videos! Thank You!
for some reason mine wont download or it has but i can't find the file lol
I can see the box and i did get a download progress just no file
Great video.
Help
I recreated the same project but when I run the script, my window does not responds or prints download error.
please help me if somebody can
great video, more video on python could be great.
Can Someone send me the code from this video without me having to manually typing everything here
No😂 at least i am not going to cus i cant figer it out
What is the text editor being used?
VS Code
does pytube still work? I keep getting an error
Wich error?
works for me!
tried about 3 weeks ago