-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmulti_downloader.py
executable file
·57 lines (52 loc) · 1.72 KB
/
multi_downloader.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
55
56
57
# This file contains the main code to run all the media downloader features
# Author: Juanchi (ea1fsc)
# Contributors:
# Imports
import sys
import os
from common import variables as vr
from Instagram import instagram_downloader as ind
from Twitter import twitter_downloader as twd
from YouTube import youtube_downloader as ytd
if __name__ == "__main__":
try:
print(vr.banner)
print("Welcome to the Media Downloader!")
print("Press CTRL + c (Control + c) when you want to exist the program")
exits = False
while not exits:
print(vr.separator)
sel = input(
f"""Select the option you desire:
1 - Download from Instagram.
2 - Download from Twitter.
3 - Download from YouTube.
0 - Exit.
Selected option: """
)
if sel == "0":
exits = True
elif sel == "1":
if ind.main() == 0:
continue
else:
print("An error has ocurred! Please try again.")
elif sel == "2":
if twd.main() == 0:
continue
else:
print("An error has ocurred! Please try again.")
elif sel == "3":
if ytd.main() == 0:
continue
else:
print("An error has ocurred! Please try again.")
else:
print("Option not valid. Please, choose one from the list.")
print(vr.separator)
print("Thanks for using the Multi-Downloader!! :D")
exit(0)
except KeyboardInterrupt:
print("\n" + vr.separator)
print("Thanks for using the Multi-Downloader!! :D")
exit(0)