video_translator / youtubevideo.py
Gotenks1893's picture
Upload 8 files
168a18b
raw
history blame
321 Bytes
from pytube import YouTube
SAVE_DIRECTORY = "./videos"
def Download(video, fname):
video = video.streams.get_highest_resolution()
try:
video.download(SAVE_DIRECTORY, filename=fname)
print("Download is completed successfully")
except:
print("A video error has occurred")