-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·35 lines (26 loc) · 857 Bytes
/
main.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
from playlist import Plist
from video import video
import sys
while True:
isVidOrPlay = input('Do you need to download a playlist or Video: ').lower()
if isVidOrPlay == 'pl':
url = input('Enter the playlist URL: ')
Plist(url)
elif isVidOrPlay == 'vi':
url = input('Enter the video URL: ')
video(url)
else:
print('please enter video or playlist')
continue
repeat = input('Do you need to download an other Video or Playlist [enter Y for yes or N for No]: ').lower()
x = 1
while repeat != 'y' and repeat != 'n' and x <= 3:
repeat = input("please enter 'Y' or 'N': ").lower()
if x == 3:
print('Sorry.. Invalide enter')
sys.exit()
x += 1
if repeat == 'y':
continue
elif repeat == 'n':
break