-
Notifications
You must be signed in to change notification settings - Fork 0
/
Youtube.py
58 lines (34 loc) · 1.01 KB
/
Youtube.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from pytube import YouTube
def Geral():
global Video
try:
url=input("URL Video:")
Video=YouTube(url)
except:
def erro1():
global Video
while True:
try:
print("Invalid URL, Type again.")
url=input("URL Video:")
Video=YouTube(url)
break
except:
erro1()
erro1()
print("URL Recebida")
def Confirm():
global SN
while True:
print("Confirm Video Title:\n\n"+Video.title)
SN=input("Your Video Title is that, Yes or No:")
List=('Yes','Y')
list2=[X.upper() for X in List]
if SN in list2:
break
else:
Confirm()
print("Download Video")
download1= Video.streams.get_highest_resolution()
download1.download()
Geral()