from pytube import YouTubedef download(link):youtube_Ob = YouTube(link,on_download_progress)youtube_Ob = youtube_Ob.streams.get_highest_resolution()try:youtube_Ob.download()except:print("An error occured!")print("YO! Download Successful")link = input("Enter the link here: ")download(link)
There is no documentation regarding the the callback on_download_progress
I tried many ways like:
youtube_Ob.register_on_progress_callback(on_progress)
but did not work rather it broke the whole script.