Datasets:
from pytube import YouTube | |
# Replace '<video_url>' with the URL of the YouTube video you want to download | |
video_url = 'https://www.youtube.com/watch?v=B5s3E9LtYwM' | |
yt = YouTube(video_url) | |
# Select the highest resolution stream for download | |
stream = yt.streams.get_highest_resolution() | |
# Download the video | |
stream.download() | |