With the pytube module you can do many things with youtube videos. A recent bug has been fixed and now it works fine again.
To install it:
pip install pytube
To nstall the latest upgrade:
pip install pytube –upgrade
An example of code to dowload a video with pytube.
from pytube import YouTube yt = YouTube("https://youtu.be/wfXt35Zv2Po") print(yt.title) stream = yt.streams.first() stream.download()