Last active
July 4, 2023 14:45
-
-
Save makesomelayouts/23f5ff61c5f293da244d270ee4a291fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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