Optimize error output & adjust code sequence #2
This commit is contained in:
@@ -62,9 +62,6 @@ def get_html(url, cookies: dict = None, ua: str = None, return_type: str = None,
|
|||||||
else:
|
else:
|
||||||
print("[-]" + errors)
|
print("[-]" + errors)
|
||||||
print('[-]Connect Failed! Please check your Proxy or Network!')
|
print('[-]Connect Failed! Please check your Proxy or Network!')
|
||||||
print("[-] --- AUTO EXIT AFTER 30s !!! --- ")
|
|
||||||
time.sleep(30)
|
|
||||||
os._exit(-1)
|
|
||||||
raise Exception('Connect Failed')
|
raise Exception('Connect Failed')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -451,6 +451,8 @@ def main():
|
|||||||
# Parse command line args
|
# Parse command line args
|
||||||
single_file_path, custom_number, logdir, regexstr, zero_op = argparse_function(version)
|
single_file_path, custom_number, logdir, regexstr, zero_op = argparse_function(version)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
main_mode = conf.main_mode()
|
main_mode = conf.main_mode()
|
||||||
if not main_mode in (1, 2, 3):
|
if not main_mode in (1, 2, 3):
|
||||||
print(f"[-]Main mode must be 1 or 2 or 3! You can run '{os.path.basename(sys.argv[0])} --help' for more help.")
|
print(f"[-]Main mode must be 1 or 2 or 3! You can run '{os.path.basename(sys.argv[0])} --help' for more help.")
|
||||||
@@ -508,6 +510,9 @@ def main():
|
|||||||
print(f"[+] [{i}/{len(res)}] Mapping Table Downloaded to {fp}")
|
print(f"[+] [{i}/{len(res)}] Mapping Table Downloaded to {fp}")
|
||||||
else:
|
else:
|
||||||
print(f"[-] [{i}/{len(res)}] Mapping Table Download failed")
|
print(f"[-] [{i}/{len(res)}] Mapping Table Download failed")
|
||||||
|
print("[-] --- AUTO EXIT AFTER 30s !!! --- ")
|
||||||
|
time.sleep(30)
|
||||||
|
os._exit(-1)
|
||||||
|
|
||||||
# create OpenCC converter
|
# create OpenCC converter
|
||||||
ccm = conf.cc_convert_mode()
|
ccm = conf.cc_convert_mode()
|
||||||
|
|||||||
Reference in New Issue
Block a user