Skip to content

Instantly share code, notes, and snippets.

@JayantGoel001
Created January 9, 2021 18:00
Show Gist options
  • Save JayantGoel001/445076349d161448ccc56e942cc451d4 to your computer and use it in GitHub Desktop.
Save JayantGoel001/445076349d161448ccc56e942cc451d4 to your computer and use it in GitHub Desktop.
Download Youtube Videos using pytube
from pytube import YouTube
# pip install git+https://github.com/nficano/pytube.git
url = 'https://www.youtube.com/watch?v=3jZXXIDXZJ8'
video = YouTube(url)
print("**********************VIDEO TITLE**********************")
print(video.title)
print("**********************Thumbnail URL**********************")
print(video.thumbnail_url)
print("**********************Description**********************")
print(video.description)
print("************************Streams************************")
for stream in video.streams:
print(stream)
video = video.streams.get_highest_resolution()
# video = video.streams.first()
video.download()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment