Pytube issues with some links

38 views Asked by At

there is a problem when i use pytube:

some links doesn;t work like this one https://youtu.be/7R-cDQ8VoM0 and i dont know why can anyone help ? this is my code:

def DownloadVideo():
        try:
            ytlink = link.get()
            YtObject = YouTube(ytlink , on_progress_callback= on_progressAudio)
            stream = YtObject.streams.get_highest_resolution()
            stream.download(output_path= fd.askdirectory(), filename = f"{YtObject.title}.mp4" )
            CTkMessagebox(title  = "Done", icon = "info", message ="Download Completed ✅")
            window2.destroy()
        except:
            CTkMessagebox(title  = "invalid link", icon = "cancel", message ="Please enter a correct link !") 
    

i tried copying the same link from other tabs but the same issue happen

an image of the problem

0

There are 0 answers