Skip to content

Instantly share code, notes, and snippets.

@makesomelayouts
Created August 1, 2023 10:46
Show Gist options
  • Select an option

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

Select an option

Save makesomelayouts/dc93c26b1e76722708ab19b01d40c747 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"
]
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 = "D:/downloads" # folder where uploaded videos will be stored
yd.download(path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment