from pytube import YouTube
# Ask for the video URL from the user
url = input("Enter the YouTube video URL: ")
# Create a YouTube object from the URL
yt = YouTube(url)
# Get the 720p stream
stream = yt.streams.filter(res="720p").first()
# Download the video
print("Downloading...")
stream.download()
print("Download completed!")
No comments:
Post a Comment