I have this code
from pytube import YouTube
SAVE_PATH = "/home/chintusharma/Downloads"
link = "https://www.youtube.com/watch?v=gzKb-JxjyWQ"
try:
yt = YouTube(link)
except:
print("connection error")
mp4_streams = yt.streams.filter(file_extension='mp4').all()
d_video = mp4_streams[1]
try:
d_video.download(output_path=SAVE_PATH)
print('video download succesfull!')
except:
print("some error!")
It was working a few weeks ago but it stopped working. How do I fix this?
I tried restarting my computer and trying it on a new colab document, it didn’t work.
New contributor
User84193 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.