File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Python/youtube-downloader Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change
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!!" )
You can’t perform that action at this time.
0 commit comments