import pytube # def download_video(url): yt=pytube.YouTube(url) video_files=yt.streams.first() video_path=video_files.download() return video_path