Python 3, pytube 9.0.6 in Windows 10.
pytube is a very easy to use light-weight library that you can use to download YouTube Videos.
Installation can be achieved in the terminal or command prompt with pip:
1 |
pip install pytube |
To download a video from YouTube you don’t really have to do much. So much so that you can get everything you need from the shell and be downloading a video in two lines of code.
1 2 |
>>> from pytube import YouTube >>> YouTube('https://www.youtube.com/watch?v=d3D7Y_ycSms').streams.first().download() |
In line 2, you can see that we have copied and pasted our YouTube URL. You can either use the one in the Address Bar on the one that appears when you click “Share” on YouTube.
Continue reading “How do I download YouTube videos with Python 3 using Pytube?”