Skip to content

Instantly share code, notes, and snippets.

@oshkoshbagoshh
Forked from shubham1710/ytdownloader.py
Created September 18, 2022 19:31
Show Gist options
  • Select an option

  • Save oshkoshbagoshh/fc6e0e680b6c44a3303d04cf5af9285c to your computer and use it in GitHub Desktop.

Select an option

Save oshkoshbagoshh/fc6e0e680b6c44a3303d04cf5af9285c to your computer and use it in GitHub Desktop.
from pytube import YouTube
#ask for the link from user
link = input("Enter the link of YouTube video you want to download: ")
yt = YouTube(link)
#Showing details
print("Title: ",yt.title)
print("Number of views: ",yt.views)
print("Length of video: ",yt.length)
print("Rating of video: ",yt.rating)
#Getting the highest resolution possible
ys = yt.streams.get_highest_resolution()
#Starting download
print("Downloading...")
ys.download()
print("Download completed!!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment