Download YT Video in Python

To install pytube, run the following command in your terminal:

$ pip install pytube

In the code:
>>> from pytube import YouTube
Then create the list of videos that would like to download as Links=['video1','video2, 'etc']
>>> Links = ['']
>>> for Video in Links:
            yt = YouTube(Video)
            print (yt.title)
            B = yt.streams.get_by_itag(18)

The provided script would save the Youtube video in the current directory.

P.S. This is your responsibility to consider the Copy Right of the videos.


Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.