Commit ea997dd 1 parent f1fdcb3 commit ea997dd Copy full SHA for ea997dd
File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Video Downloader
2
+ # By @Bethu05
3
+ # v1.0
4
+
5
+ from pytube import YouTube
6
+
7
+ # video_url = YouTube('https://youtu.be/crYum29M-VE')
8
+ print ('\t Youtube MP4 Video Downloader' )
9
+ # Get Video Url from User
10
+
11
+
12
+ def get_video_id ():
13
+ # get User to Paste the video Url
14
+ url = input ('Paste The Video Url: ' )
15
+ video_url = YouTube (url )
16
+ return video_url
17
+
18
+
19
+ def video_downloader (url , folder ): # ? Download Specific Video
20
+ # Get The highest resolution with pregressive=True and .mp4 file extension
21
+ highest_res = url .streams .filter (
22
+ progressive = True , file_extension = 'mp4' ).get_highest_resolution ()
23
+ # Download the Highest Resolution to entered folder
24
+ highest_res .download (output_path = f'Downloads/{ folder } ' )
25
+
26
+
27
+ try :
28
+ folder = input ('Enter Folder Name: ' )
29
+ video_id = get_video_id ()
30
+ video_downloader (video_id , folder )
31
+ except Exception as e :
32
+ print (e )
You can’t perform that action at this time.
0 commit comments