Download any youtube video using python

Hello in this blog, I am sharing with you guys the code with which you can download any youtube video and that too directly in your computer or mobile phone.

things you'll be needing :

1.python interpreter

2.python module: pytube

3.some basics  of python

To download the module pytube :

run the command "pip install pytube " in your python terminal or if you are using pycharm or VS code you ca download it from settings.

please do share this blog with your friends and family.


Downloading a video:

import pytube

link = " paste the link of the video here "
video_download = pytube.Youtube(link).streams.first().download("path where you want it to download")
#run the code


video will be download without any issue.

Downloading only audio:
import pytube

link=" paste the link of the video here "
video_download=pytube.Youtube(link).streams.filter(audio_only=True)
video_download.dowload
#run the code
only  audio  of the video will be download 


subscribe the blog to get more content like this and please share it with others too.



Comments

Popular Posts