diff --git a/main.py b/main.py index 12f06b2..0f57aed 100644 --- a/main.py +++ b/main.py @@ -1,19 +1,21 @@ import src.monitor as monitor +import src.tools as tools -from colorama import Style, Fore, Back, init +from colorama import Style, Fore, init if __name__ == "__main__": - spacer = "===========================================================================" url = "https://www.nike.com/de/launch?s=upcoming" num_monitors = 10 init(autoreset=True) - print(f"Creating {num_monitors} new Monitors...\n{spacer}") + tools.clear() + print(f"Creating {num_monitors} new Monitors...\n{tools.spacer}") for i in range(0, num_monitors): mon = monitor.Monitor() mon.name = f"Monitor {i}" mon.url = url - print(f"{Fore.MAGENTA}{mon.name}") - print(spacer) + print(f"{Fore.MAGENTA}{mon.name}{Style.RESET_ALL} |" + f" {tools.keyword('URL')}({mon.url}) {tools.keyword('PROXY')}({mon.proxy})") + print(tools.spacer) diff --git a/src/monitor.py b/src/monitor.py index a9febdf..7ded08a 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -3,3 +3,4 @@ class Monitor: def __init__(self): self.url = None self.name = None + self.proxy = None diff --git a/src/tools.py b/src/tools.py new file mode 100644 index 0000000..5b33bb0 --- /dev/null +++ b/src/tools.py @@ -0,0 +1,15 @@ +import os +from colorama import Style, Fore, init + + +def clear(): + os.system('cls' if os.name == 'nt' else 'clear') + + +def keyword(kwd): + kwd = f"{Fore.RED}{kwd}{Style.RESET_ALL}" + return kwd + + +init() +spacer = "===================================================================================================="