Stop being the product.
Become the owner.
or
sign uplog in

ap=1padtbipUDsNeed help So I recently followed a tutorial…

ap=1padtbipUDsNeed help

So I recently followed a tutorial on YouTube about how to make a YouTube Downloader GUI on python, but it kept saying that the link is invalid at every link I tried it with.

Can someone help me about it?

import tkinter
import customtkinter
from pytube import YouTube

def startdownload():
    try:
        ytLink=link.get()
        ytobject=YouTube(ytLink)
        video=ytobject.streams.get_highest_resolution()
        video.download(output_path=r"C:\Users\Eleve\Downloads\YT")
        print("Download Complete!")
    except:
        print("Youtube link is invalid")
   


#System ettings
customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("blue")

#App frame
app=customtkinter.CTk()
app.geometry("720x480")
app.title("Youtube ownloader")

#Add I elements
title=customtkinter.CTkLabel(app,text="Link")
title.pack(padx=10, ady=10)

#Link nput
url_var=customtkinter.StringVar()
link=customtkinter.CTkEntry(app, width=350, height=40, textvariable=url_var)
link.pack()

#Dowload utton
download= customtkinter.CTkButton(app, ext="Download", command=startdownload)
download.pack(padx=0)


p
app.mainloop()

#dev #technology #programming #Run 1y0,
earnings
8,000 mlx total
$0  total
engagement
13 views
0 reactions

0 comments