import time import random import string #Searching vars tries = 0 found = False def website(): print("Website: " + str(res) + "\n") print("Q - Exit") print("W - Add to favorites") print("E - Find another page") usr_input = input("> ") if usr_input == q: exit() elif usr_input == w: print("Added to favorites\n") website() elif usr_input == e: searching() else: print("Error, There is no such option.") website() def stats(): global results global tries global found timer = time.time() print("Tries:" + str(tries)) print("It took:" + str(timer)) print("\nTo view page press enter.") usr_input = input("> ") def searching(): global tries # Adding and subtracting letters tries += 1 chars = 50 add_num = False while add_num == True: chars += 1 if chars == 50: add_num = False searching() print(chars) while chars == False: chars -= 1 if chars == 12: add_num = True searching() print(chars) if found == True: stats() #start res = ''.join(random.choices(string.ascii_lowercase + string.ascii_uppercase + string.digits, k = chars)) res += ".onion" ###### searching() print("Press enter to find random dark-net website") usr_input = input("> ") print("Searching for website...") time.sleep(10) searching()My code suppose to find random dark-net websites by generating random strings with numbers and letters.
error:maximum recursion depth exceeded while calling a Python object
I know what this error means but I don't know how to fix it.
Thanks in advance!