14
loading...
This website collects cookies to deliver better user experience
PyTube
. Its an awesome python module which helps us download youtube video!!!Note :
When you are installing python do check the box which says something like "pip" we will required it for installing pytube module . If we dont do that we will get error during installation of pytube module.
pip install pytube
# importing the pytube module
from pytube import YouTube
# link of the video to be downloaded
link="https://youtu.be/z-vLtsKvp_4"
yt = YouTube(link)
# getting title of the video
head= yt.title
print(head)
#the streams is pytube class which help filter the content and download just audio or video or both
dl = yt.streams.get_by_itag(22)
#itag is the value given to different video quality stuff.
# For example here itag value 22 means video quality is 720p and we download both audio as well as video format
# Similarly itag value 18 means video quality is 360p and there are many itag value through which you can download differently like just audio or video or both with different video quality.
dl.download()