from requests import get, post userid = input("Enter your userid (U-something): ") baseURL = f"https://account.neos.com/v1/meteors/{userid}" def get_meteors(): data = get(baseURL) if data.text == "-1": print("User not found") exit() elif data.text == "-2": print("Database issue") exit() return data.json() def mine_stuff_idk(meteor_id): url = f"{baseURL}/mined/{meteor_id}" res = post(url) if res.text == "-1": print(f"Meteor {meteor_id} not found") elif res.text == "1": print(f"Meteor {meteor_id} mined") else: print(f"Meteor {meteor_id} already mined") all_meteors = get_meteors() for meteor in all_meteors["meteors"]: mine_stuff_idk(meteor["id"])