-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.py
38 lines (31 loc) · 812 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
36
37
import sys
try:
import utils, actions
except ImportError as error:
print(error)
sys.exit("Missing module!")
try:
import re, json, mechanize
except ImportError as error:
print(error)
_, missing_moudle, _ = str(error).split("'")
sys.exit("Usage: \"pip install %s\" or \"apt install python-%s\""
%(missing_moudle, missing_moudle)
)
try:
getcookie = open('cookie.dat', 'r').replace("\n", "")
cookie = getcookie.read()
getcookie.close()
except:
utils.printf("Error while reading cookie", "bad")
sys.exit("Reading cookie.dat error")
if len(sys.argv) == 1:
utils.print_help()
else:
option = sys.argv[1]
if option == "help" or option == "-h" or option == "--help":
utils.print_full_help()
else:
utils.print_banner()
utils.printf("\nPlease wait....")
actions.get_data(option, cookie)