I am learning pytube
to download Youtube video and tried tqdm
on top of it to show progress bar but it shows various error and also I could not understand what is happening when I download video with pytube
and showing progress bar which is the reason for me to not able to add tqdm
in it.
The code I have written with pytube
runs well, this is the code:
from pytube import YouTube
url = str(input("Enter the video link: "))
yt = YouTube(url)
videos = yt.streams.filter(file_extension='mp4').all()
filename = yt.title
s = 1
for v in videos:
print(str(s)+". "+str(v))
s += 1
n = int(input("Enter the number of the video: "))
vid = videos[n-1]
vid.download("C:/Users/user/Downloads/")
print(yt.title,"\nHas been successfully downloaded")
I need tqdm
to be added to the code to show a progress bar.