From 9feac6b7d89009a17b8ed11a90bb9d4ceb9bffef Mon Sep 17 00:00:00 2001 From: Kuucheen <70746714+Kuucheen@users.noreply.github.com> Date: Fri, 2 Sep 2022 15:16:28 +0200 Subject: [PATCH] Add files via upload --- KC-Scraper.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/KC-Scraper.py b/KC-Scraper.py index da2b84a..c8ae48d 100644 --- a/KC-Scraper.py +++ b/KC-Scraper.py @@ -122,19 +122,22 @@ def main(): clearingproxy = True if threads == "?": - try: - threads = int(input(f"\n{white}[{color}^{white}] {color}Threads {white}>> {color}")) - except ValueError: - print(f"{white}[{color}!{white}] {color}Thread needs a number") - time.sleep(3) - main() - exit() + + threads = input(f"\n{white}[{color}^{white}] {color}Threads {white}>> {color}") elif threads.isdigit() == False: print(f"{white}[{Colors.red}!{white}] {Colors.red}Error{white} in settings.json at threads") input() exit() + try: + threads = int(threads) + except ValueError: + print(f"{white}[{color}!{white}] {color}Thread needs a number") + time.sleep(3) + main() + exit() + if threads < 1: print(f"{white}[{color}!{white}] {color}Thread needs a number greater than 0") time.sleep(3)