mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-27 14:01:12 +00:00
files added for youtube video download
This commit is contained in:
parent
5e42fdc82d
commit
419aae918b
7
scripts/Youtube_video_download/README.md
Normal file
7
scripts/Youtube_video_download/README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Download YouTube video by URL
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
- Clone the repo
|
||||||
|
- download the requirements
|
||||||
|
- run `python youtube_download.py`
|
14
scripts/Youtube_video_download/youtube_download.py
Normal file
14
scripts/Youtube_video_download/youtube_download.py
Normal file
|
@ -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!!")
|
Loading…
Reference in New Issue
Block a user