Python Projects

Download YouTube videos using python for beginners 

How to download YouTube videos using python for beginners – In this tutorial we will be using the pytube module in python to download videos from YouTube using a direct URL.

YouTube Video Downloader
Author: Ayushi Rawat

#import the package
from pytube import YouTube

url = 'Your URL goes here'
my_video = YouTube(url)

print("*********************Video Title************************")
#get Video Title

print("********************Tumbnail Image***********************")
#get Thumbnail Image

print("********************Download video*************************")
#get all the stream resolution for the 
for stream in my_video.streams:

#set stream resolution
my_video = my_video.streams.get_highest_resolution()

#my_video = my_video.streams.first()

#Download video

Leave a Reply

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

Back to top button