Created
July 22, 2018 11:09
-
-
Save erykml/6a48af8d98ddb2c35f549284d70bf1f0 to your computer and use it in GitHub Desktop.
downloading youtube video with pytube
This file contains 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
# library | |
from pytube import YouTube | |
mario_video = YouTube('https://www.youtube.com/watch?v=lXMJt5PP3kM') | |
# viewing available video formats | |
print('Title:', mario_video.title, '---') | |
stream = mario_video.streams.filter(file_extension = "mp4").all() | |
for i in stream: | |
print(i) | |
# downloading the video | |
mario_video.streams.get_by_itag(18).download() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment