Skip to content

Instantly share code, notes, and snippets.

@nsdevaraj
Created January 13, 2022 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsdevaraj/30b3ddc57a97038819e15d3e7137dd17 to your computer and use it in GitHub Desktop.
Save nsdevaraj/30b3ddc57a97038819e15d3e7137dd17 to your computer and use it in GitHub Desktop.
Download YouTube videos
from pytube import YouTube
DOWNLOAD_FOLDER = "/Users/devarajns/Downloads"
video_url = "https://www.youtube.com/watch?v=6Se3SmOkAII"
video_obj = YouTube(video_url),
stream = video_obj.streams.get_highest_resolution()
stream.download(DOWNLOAD_FOLDER)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment