We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a46a6ff commit 25b8facCopy full SHA for 25b8fac
YoutubeDownloader.py
@@ -0,0 +1,32 @@
1
+#pip install pytube to install library
2
+from pytube import YouTube
3
+link = input("Enter youtube url:")
4
+yt = YouTube(link)
5
+
6
+SAVE_PATH = "E:/"
7
8
+#Title of Video
9
+print("Title:",yt.title)
10
11
+#Number of Views
12
+print("Views:",yt.views)
13
14
+#Length of Video
15
+print("Length of Video:",yt.length,"seconds")
16
17
+#Rating of Video
18
+print("Rating:",yt.rating)
19
20
+x = input("Do you want video or audio(v/a): ")
21
+if x=="v":
22
+ print(yt.streams.filter(progressive=True))
23
+ ys = yt.streams.get_by_itag('22')
24
25
+else:
26
+ print(yt.streams.filter(only_audio=True))
27
+ ys = yt.streams.get_by_itag('251')
28
29
+#Downloading
30
+print("***DOWNLOADING***")
31
+ys.download(SAVE_PATH)
32
+print("***DOWNLOADED***")
0 commit comments