Skip to content

Commit 33d7cb0

Browse files
authored
Merge pull request #210 from TaniaMalhotra/youtube-downloader
Youtube downloader
2 parents 1b2475e + 34af285 commit 33d7cb0

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

Python/youtube-downloader/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Youtube video downloader
2+
- - - - - - - -
3+
## Aim
4+
The aim of the script is to be able to download a youtube video from the terminal.
5+
6+
## Requirements
7+
```python -m pip install git+https://github.com/nficano/pytube```
8+
9+
## To run
10+
- ```python download.py```
11+
- Enter the link of the youtube video
12+
- Video will download in hoghest resolution in current directory
13+

Python/youtube-downloader/download.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from pytube import YouTube
2+
# first we'll take the user input of link
3+
link = input("Please enter you tube video link ")
4+
yt = YouTube(link)
5+
6+
#Showing details of video
7+
print("Title of the video is: ",yt.title)
8+
print("Number of views: ",yt.views)
9+
print("Length of video: ",yt.length)
10+
print("Rating of video: ",yt.rating)
11+
12+
# lists out best resolution
13+
print(yt.streams.filter(progressive=True))
14+
15+
# Downloading video in best reslution
16+
ys = yt.streams.get_highest_resolution()
17+
18+
#Starting download
19+
print("Downloading your video...")
20+
ys.download()
21+
print("Download of video completed!!")

0 commit comments

Comments
 (0)