From 419aae918b79697c4b05f7e7732255fb6c6aeef8 Mon Sep 17 00:00:00 2001 From: Akash Jain Date: Tue, 4 Oct 2022 17:00:23 +0530 Subject: [PATCH] files added for youtube video download --- scripts/Youtube_video_download/README.md | 7 +++++++ scripts/Youtube_video_download/youtube_download.py | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 scripts/Youtube_video_download/README.md create mode 100644 scripts/Youtube_video_download/youtube_download.py diff --git a/scripts/Youtube_video_download/README.md b/scripts/Youtube_video_download/README.md new file mode 100644 index 0000000..0881a57 --- /dev/null +++ b/scripts/Youtube_video_download/README.md @@ -0,0 +1,7 @@ +# Download YouTube video by URL + +## Usage + +- Clone the repo +- download the requirements +- run `python youtube_download.py` diff --git a/scripts/Youtube_video_download/youtube_download.py b/scripts/Youtube_video_download/youtube_download.py new file mode 100644 index 0000000..76ca2e9 --- /dev/null +++ b/scripts/Youtube_video_download/youtube_download.py @@ -0,0 +1,14 @@ +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!!")