Python dosyası kapanıyor

karul

Decapat
Katılım
3 Eylül 2022
Mesajlar
2.989
Çözümler
19
Merhaba, Roblox üzerinde sahipsiz grupları bulacak bir kod yazıyorum. Bir tane problemim var.
Configuration kısmında webhook ayarladıktan sonra kapanıyor. Ben bunu istemiyorum. Geri ana menüye dönmesini istiyorum. Yani sadece exit seçeneği ile programı kapatmak istiyorum.
Kod:

Python:
import requests
import os
import sys
import configparser
import fade

def cls():
    os.system('cls' if os.name=='nt' else 'clear')
cls()
file = open('options.txt', 'a')
file1 = open('options.txt', 'r')
discord = requests.get("https://raw.githubusercontent.com/underatedtails/roblox-group-finder/main/urtcustom.json")
discord_data = discord.json()
text = f'''
  █    ██  ██▀███  ▄▄▄█████▓     ▄████  ██▀███   ▒█████   █    ██  ██▓███       █████▒ ██▓ ███▄    █ ▓█████▄ ▓█████  ██▀███ 
  ██  ▓██▒▓██ ▒ ██▒▓  ██▒ ▓▒    ██▒ ▀█▒▓██ ▒ ██▒▒██▒  ██▒ ██  ▓██▒▓██░  ██▒   ▓██   ▒ ▓██▒ ██ ▀█   █ ▒██▀ ██▌▓█   ▀ ▓██ ▒ ██▒
 ▓██  ▒██░▓██ ░▄█ ▒▒ ▓██░ ▒░   ▒██░▄▄▄░▓██ ░▄█ ▒▒██░  ██▒▓██  ▒██░▓██░ ██▓▒   ▒████ ░ ▒██▒▓██  ▀█ ██▒░██   █▌▒███   ▓██ ░▄█ ▒
 ▓▓█  ░██░▒██▀▀█▄  ░ ▓██▓ ░    ░▓█  ██▓▒██▀▀█▄  ▒██   ██░▓▓█  ░██░▒██▄█▓▒ ▒   ░▓█▒  ░ ░██░▓██▒  ▐▌██▒░▓█▄   ▌▒▓█  ▄ ▒██▀▀█▄ 
 ▒▒█████▓ ░██▓ ▒██▒  ▒██▒ ░    ░▒▓███▀▒░██▓ ▒██▒░ ████▓▒░▒▒█████▓ ▒██▒ ░  ░   ░▒█░    ░██░▒██░   ▓██░░▒████▓ ░▒████▒░██▓ ▒██▒
 ░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░  ▒ ░░       ░▒   ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░▒▓▒ ▒ ▒ ▒▓▒░ ░  ░    ▒ ░    ░▓  ░ ▒░   ▒ ▒  ▒▒▓  ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░
 ░░▒░ ░ ░   ░▒ ░ ▒░    ░         ░   ░   ░▒ ░ ▒░  ░ ▒ ▒░ ░░▒░ ░ ░ ░▒ ░         ░       ▒ ░░ ░░   ░ ▒░ ░ ▒  ▒  ░ ░  ░  ░▒ ░ ▒░
  ░░░ ░ ░   ░░   ░   ░         ░ ░   ░   ░░   ░ ░ ░ ░ ▒   ░░░ ░ ░ ░░           ░ ░     ▒ ░   ░   ░ ░  ░ ░  ░    ░     ░░   ░
    ░        ░                       ░    ░         ░ ░     ░                          ░           ░    ░       ░  ░   ░       by URT
                                                                                                     ░                      
# Github: https://github.com/underratedtails
# Discord: {discord_data.get('discord')}
# Webhook: {file1.readline()}
# Tip: You can hide your webhook from the configuration section.
'''
print(fade.purplepink(text))
options = int(input(fade.purplepink('# 1 - Start\n# 2 - Configuration\n# 3 - Exit\n>> ')))
if options == 1:
    cls()
    print(fade.purplepink(text))
    os.system(f'py finder.py -p proxies.txt --webhook-url {file1.readlines()}')
elif options == 2:
    cls()
    print(fade.purplepink(text))
    configuration = int(input(fade.purplepink('# 1- Set Webhook\n>> ')))
    if configuration == 1:
        webhook = input(fade.purplepink('Enter your webhook: '))
        file.write(webhook)
    if configuration == 4:
        sys.exit()
elif options == 3:
    sys.exit()
 
Son düzenleyen: Moderatör:
Python:
import requests
import os
import sys
import configparser
import fade

def cls():
    os.system('cls' if os.name=='nt' else 'clear')
cls()
file = open('options.txt', 'a')
file1 = open('options.txt', 'r')
discord = requests.get("https://raw.githubusercontent.com/underatedtails/roblox-group-finder/main/urtcustom.json")
discord_data = discord.json()
text = f'''
  █    ██  ██▀███  ▄▄▄█████▓     ▄████  ██▀███   ▒█████   █    ██  ██▓███       █████▒ ██▓ ███▄    █ ▓█████▄ ▓█████  ██▀███
  ██  ▓██▒▓██ ▒ ██▒▓  ██▒ ▓▒    ██▒ ▀█▒▓██ ▒ ██▒▒██▒  ██▒ ██  ▓██▒▓██░  ██▒   ▓██   ▒ ▓██▒ ██ ▀█   █ ▒██▀ ██▌▓█   ▀ ▓██ ▒ ██▒
 ▓██  ▒██░▓██ ░▄█ ▒▒ ▓██░ ▒░   ▒██░▄▄▄░▓██ ░▄█ ▒▒██░  ██▒▓██  ▒██░▓██░ ██▓▒   ▒████ ░ ▒██▒▓██  ▀█ ██▒░██   █▌▒███   ▓██ ░▄█ ▒
 ▓▓█  ░██░▒██▀▀█▄  ░ ▓██▓ ░    ░▓█  ██▓▒██▀▀█▄  ▒██   ██░▓▓█  ░██░▒██▄█▓▒ ▒   ░▓█▒  ░ ░██░▓██▒  ▐▌██▒░▓█▄   ▌▒▓█  ▄ ▒██▀▀█▄
 ▒▒█████▓ ░██▓ ▒██▒  ▒██▒ ░    ░▒▓███▀▒░██▓ ▒██▒░ ████▓▒░▒▒█████▓ ▒██▒ ░  ░   ░▒█░    ░██░▒██░   ▓██░░▒████▓ ░▒████▒░██▓ ▒██▒
 ░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░  ▒ ░░       ░▒   ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░▒▓▒ ▒ ▒ ▒▓▒░ ░  ░    ▒ ░    ░▓  ░ ▒░   ▒ ▒  ▒▒▓  ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░
 ░░▒░ ░ ░   ░▒ ░ ▒░    ░         ░   ░   ░▒ ░ ▒░  ░ ▒ ▒░ ░░▒░ ░ ░ ░▒ ░         ░       ▒ ░░ ░░   ░ ▒░ ░ ▒  ▒  ░ ░  ░  ░▒ ░ ▒░
  ░░░ ░ ░   ░░   ░   ░         ░ ░   ░   ░░   ░ ░ ░ ░ ▒   ░░░ ░ ░ ░░           ░ ░     ▒ ░   ░   ░ ░  ░ ░  ░    ░     ░░   ░
    ░        ░                       ░    ░         ░ ░     ░                          ░           ░    ░       ░  ░   ░       by URT
                                                                                                     ░                     
# Github: https://github.com/underratedtails
# Discord: {discord_data.get('discord')}
# Webhook: {file1.readline()}
# Tip: You can hide your webhook from the configuration section.
'''
def finder(text, file1):
    cls()
    print(fade.purplepink(text))
    os.system(f'py finder.py -p proxies.txt --webhook-url {file1.readlines()}')

def config(text, file):
    cls()
    print(fade.purplepink(text))
    configuration = int(input(fade.purplepink('# 1- Set Webhook\n>> ')))
    if configuration == 1:
        webhook = input(fade.purplepink('Enter your webhook: '))
        file.write(webhook)
    if configuration == 4:
        sys.exit()

def option(text, file, file1):   
    print(fade.purplepink(text))
    options = int(input(fade.purplepink('# 1 - Start\n# 2 - Configuration\n# 3 - Exit\n>> ')))
    if options == 1:
        finder(text, file1)
    elif options == 2:
        config(text, file)
        option(text, file, file1)
    elif options == 3:
        sys.exit()


option(text, file, file1)
 
Python:
import requests.
import os.
import sys.
import configparser.
import fade.

def cls():
 os.system('cls' if os.name=='nt' else 'clear')
cls()
file = open('options.txt', 'a')
file1 = open('options.txt', 'r')
discord = requests.get("https://raw.githubusercontent.com/underatedtails/roblox-group-finder/main/urtcustom.json")
discord_data = discord.json()
text = f'''.
 █ ██ ██▀███ ▄▄▄█████▓ ▄████ ██▀███ ▒█████ █ ██ ██▓███ █████▒ ██▓ ███▄ █ ▓█████▄ ▓█████ ██▀███
 ██ ▓██▒▓██ ▒ ██▒▓ ██▒ ▓▒ ██▒ ▀█▒▓██ ▒ ██▒▒██▒ ██▒ ██ ▓██▒▓██░ ██▒ ▓██ ▒ ▓██▒ ██ ▀█ █ ▒██▀ ██▌▓█ ▀ ▓██ ▒ ██▒
 ▓██ ▒██░▓██ ░▄█ ▒▒ ▓██░ ▒░ ▒██░▄▄▄░▓██ ░▄█ ▒▒██░ ██▒▓██ ▒██░▓██░ ██▓▒ ▒████ ░ ▒██▒▓██ ▀█ ██▒░██ █▌▒███ ▓██ ░▄█ ▒
 ▓▓█ ░██░▒██▀▀█▄ ░ ▓██▓ ░ ░▓█ ██▓▒██▀▀█▄ ▒██ ██░▓▓█ ░██░▒██▄█▓▒ ▒ ░▓█▒ ░ ░██░▓██▒ ▐▌██▒░▓█▄ ▌▒▓█ ▄ ▒██▀▀█▄
 ▒▒█████▓ ░██▓ ▒██▒ ▒██▒ ░ ░▒▓███▀▒░██▓ ▒██▒░ ████▓▒░▒▒█████▓ ▒██▒ ░ ░ ░▒█░ ░██░▒██░ ▓██░░▒████▓ ░▒████▒░██▓ ▒██▒
 ░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░ ▒ ░░ ░▒ ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░▒▓▒ ▒ ▒ ▒▓▒░ ░ ░ ▒ ░ ░▓ ░ ▒░ ▒ ▒ ▒▒▓ ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░
 ░░▒░ ░ ░ ░▒ ░ ▒░ ░ ░ ░ ░▒ ░ ▒░ ░ ▒ ▒░ ░░▒░ ░ ░ ░▒ ░ ░ ▒ ░░ ░░ ░ ▒░ ░ ▒ ▒ ░ ░ ░ ░▒ ░ ▒░
 ░░░ ░ ░ ░░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░░░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░
 ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ by URT.
 ░
# Github: https://github.com/underratedtails
# Discord: {discord_data.get('discord')}
# Webhook: {file1.readline()}
# Tip: You can hide your webhook from the configuration section.
'''.
def finder(text, file1):
 cls()
 print(fade.purplepink(text))
 os.system(f'py finder.py -p proxies.txt --webhook-url {file1.readlines()}')

def config(text, file):
 cls()
 print(fade.purplepink(text))
 configuration = int(input(fade.purplepink('# 1- Set Webhook\n>> ')))
 if configuration == 1:
 webhook = input(fade.purplepink('Enter your webhook: '))
 file.write(webhook)
 if configuration == 4:
 sys.exit()

def option(text, file, file1):
 print(fade.purplepink(text))
 options = int(input(fade.purplepink('# 1 - Start\n# 2 - Configuration\n# 3 - Exit\n>> ')))
 if options == 1:
 finder(text, file1)
 elif options == 2:
 config(text, file)
 option(text, file, file1)
 elif options == 3:
 sys.exit()

option(text, file, file1)

İşe yarıyor fakat ayarlardan çıkıp ana menü'ye döndüğünde tekrar yazıyı atmadan önce bütün yazıları silmesini istiyorum.
 
İşe yarıyor fakat ayarlardan çıkıp ana menü'ye döndüğünde tekrar yazıyı atmadan önce bütün yazıları silmesini istiyorum.
Python:
import requests
import os
import sys
import configparser
import fade

def cls():
    os.system('cls' if os.name=='nt' else 'clear')
cls()
file = open('options.txt', 'a')
file1 = open('options.txt', 'r')
discord = requests.get("https://raw.githubusercontent.com/underatedtails/roblox-group-finder/main/urtcustom.json")
discord_data = discord.json()
text = f'''
  █    ██  ██▀███  ▄▄▄█████▓     ▄████  ██▀███   ▒█████   █    ██  ██▓███       █████▒ ██▓ ███▄    █ ▓█████▄ ▓█████  ██▀███
  ██  ▓██▒▓██ ▒ ██▒▓  ██▒ ▓▒    ██▒ ▀█▒▓██ ▒ ██▒▒██▒  ██▒ ██  ▓██▒▓██░  ██▒   ▓██   ▒ ▓██▒ ██ ▀█   █ ▒██▀ ██▌▓█   ▀ ▓██ ▒ ██▒
 ▓██  ▒██░▓██ ░▄█ ▒▒ ▓██░ ▒░   ▒██░▄▄▄░▓██ ░▄█ ▒▒██░  ██▒▓██  ▒██░▓██░ ██▓▒   ▒████ ░ ▒██▒▓██  ▀█ ██▒░██   █▌▒███   ▓██ ░▄█ ▒
 ▓▓█  ░██░▒██▀▀█▄  ░ ▓██▓ ░    ░▓█  ██▓▒██▀▀█▄  ▒██   ██░▓▓█  ░██░▒██▄█▓▒ ▒   ░▓█▒  ░ ░██░▓██▒  ▐▌██▒░▓█▄   ▌▒▓█  ▄ ▒██▀▀█▄
 ▒▒█████▓ ░██▓ ▒██▒  ▒██▒ ░    ░▒▓███▀▒░██▓ ▒██▒░ ████▓▒░▒▒█████▓ ▒██▒ ░  ░   ░▒█░    ░██░▒██░   ▓██░░▒████▓ ░▒████▒░██▓ ▒██▒
 ░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░  ▒ ░░       ░▒   ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░▒▓▒ ▒ ▒ ▒▓▒░ ░  ░    ▒ ░    ░▓  ░ ▒░   ▒ ▒  ▒▒▓  ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░
 ░░▒░ ░ ░   ░▒ ░ ▒░    ░         ░   ░   ░▒ ░ ▒░  ░ ▒ ▒░ ░░▒░ ░ ░ ░▒ ░         ░       ▒ ░░ ░░   ░ ▒░ ░ ▒  ▒  ░ ░  ░  ░▒ ░ ▒░
  ░░░ ░ ░   ░░   ░   ░         ░ ░   ░   ░░   ░ ░ ░ ░ ▒   ░░░ ░ ░ ░░           ░ ░     ▒ ░   ░   ░ ░  ░ ░  ░    ░     ░░   ░
    ░        ░                       ░    ░         ░ ░     ░                          ░           ░    ░       ░  ░   ░       by URT
                                                                                                     ░                     
# Github: https://github.com/underratedtails
# Discord: {discord_data.get('discord')}
# Webhook: {file1.readline()}
# Tip: You can hide your webhook from the configuration section.
'''
def finder(text, file1):
    cls()
    print(fade.purplepink(text))
    os.system(f'py finder.py -p proxies.txt --webhook-url {file1.readlines()}')

def config(text, file):
    cls()
    print(fade.purplepink(text))
    configuration = int(input(fade.purplepink('# 1- Set Webhook\n>> ')))
    if configuration == 1:
        webhook = input(fade.purplepink('Enter your webhook: '))
        file.write(webhook)
    if configuration == 4:
        sys.exit()

def option(text, file, file1):
    cls()   
    print(fade.purplepink(text))
    options = int(input(fade.purplepink('# 1 - Start\n# 2 - Configuration\n# 3 - Exit\n>> ')))
    if options == 1:
        finder(text, file1)
    elif options == 2:
        config(text, file)
        option(text, file, file1)
    elif options == 3:
        sys.exit()


option(text, file, file1)
 

Geri
Yukarı