1#download pytube with pip install pytube
2import pytube
3
4#made it a function so that you can call it from any script and just pass in
5#the url in ""
6def downloadVideo(url):
7 youtube = pytube.YouTube(url)
8 video = youtube.streams.get_highest_resolution()
9 print(video.title)
10 video.download()
11
12