python-scripts/scripts/Youtube_video_download/youtube_download.py

15 lines
319 B
Python
Raw Normal View History

2022-10-04 11:30:23 +00:00
from pytube import YouTube
link = input("Enter URL of YouTube video: ")
youtube = YouTube(link)
videos = youtube.streams.all()
videos_list = list(enumerate(videos))
for i in videos_list:
print(i)
strm = int(input("Enter index number: "))
videos[strm].download()
print("YouTube video Downloaded successfully!!")