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 = ['https://www.youtube.com/watch?v=DayfXQXyenQ']
>>> for Video in Links:
            yt = YouTube(Video)
            print (yt.title)
            B = yt.streams.get_by_itag(18)
            B.download()

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.

1 Comment

  • v1 = points[tuple([self.mesh[“v1”]])]
    v2 = points[tuple([self.mesh[“v2”]])]
    v3 = points[tuple([self.mesh[“v3”]])]

Leave a Reply

Your email address will not be published. Required fields are marked *

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