Skip to content

Instantly share code, notes, and snippets.

@makesomelayouts
Last active July 4, 2023 14:45
Show Gist options
  • Select an option

  • Save makesomelayouts/23f5ff61c5f293da244d270ee4a291fc to your computer and use it in GitHub Desktop.

Select an option

Save makesomelayouts/23f5ff61c5f293da244d270ee4a291fc to your computer and use it in GitHub Desktop.
from pytube import YouTube
if __name__ == '__main__':
links = [
# 'https://www.youtube.com/shorts/klmBTGQUkbM', 'https://www.youtube.com/watch?v=hS5CfP8n_js'
'https://www.youtube.com/watch?v=unUaqMJA9D0'
]
counter = 0
for link in links:
yt = YouTube(link)
print(f'Link #{counter}: {link}')
counter += 1
print(f'Title: {yt.title}')
print(f'Views: {yt.views}')
print(f'Info: {yt.streams.get_highest_resolution()}\n')
yd = yt.streams.get_highest_resolution()
path = 'yt-vids/'
yd.download(path) # folder where uploaded videos will be stored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment