import json

message1 = (‘Congratulations on receiving’)
message2 = (‘It has been deposited into your account balance and can be viewed on the dashboard!’)

email = input(‘Enter Email: \n==>’)
password = input(‘Enter Pass: \n==>’)

cookies = {
    ‘googtrans’: ‘/en/en’,
    ‘show_nt1’: ‘1’,
    ‘login’: ‘1’,
    ‘user’: ‘957267646767-197.48.12.95’,
}

headers = {
    ‘accept’: ‘application/json, text/javascript, /; q=0.01’,
    ‘accept-language’: ‘en-GB,en;q=0.6’,
    ‘content-type’: ‘application/json’,
    # ‘cookie’: ‘googtrans=/en/en; show_nt1=1; login=1; user=957267646767-197.48.12.95’,
    ‘dnt’: ‘1’,
    ‘origin’: ‘https://faucetearner.org’,
    ‘priority’: ‘u=1, i’,
    ‘referer’: ‘https://faucetearner.org/login.php’,
    ‘sec-ch-ua’: ‘“Not/A)Brand”;v=“8”, “Chromium”;v=“126”, “Brave”;v=“126”’,
    ‘sec-ch-ua-mobile’: ‘?0’,
    ‘sec-ch-ua-platform’: ‘“Windows”’,
    ‘sec-fetch-dest’: ‘empty’,
    ‘sec-fetch-mode’: ‘cors’,
    ‘sec-fetch-site’: ‘same-origin’,
    ‘sec-gpc’: ‘1’,
    ‘user-agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36’,
    ‘x-requested-with’: ‘XMLHttpRequest’,
}

params = {
    ‘act’: ‘login’,
}

json_data = {
    ‘email’: email,
    ‘password’: password,
}

response = requests.post(‘https://faucetearner.org/api.php’, params=params, cookies=cookies, headers=headers, json=json_data)
#print(response.cookies)

json_data = response.cookies
json_data = str(json_data)
start_index = json_data.find(“user=”) + 5
end_index = json_data.find(" for", start_index)
line3 = json_data[start_index:end_index]
##########################################################################################################################

cookies = {
    ‘googtrans’: ‘/en/en’,
    ‘show_nt1’: ‘1’,
    ‘login’: ‘1’,
    ‘user’: line3,
}

headers = {
    ‘accept’: ‘application/json, text/javascript, /; q=0.01’,
    ‘accept-language’: ‘en-GB,en;q=0.6’,
    # Already added when you pass json=
    # ‘content-type’: ‘application/json’,
    # ‘cookie’: ‘googtrans=/en/en; show_nt1=1; login=1; user=957267646767-197.48.12.95’,
    ‘dnt’: ‘1’,
    ‘origin’: ‘https://faucetearner.org’,
    ‘priority’: ‘u=1, i’,
    ‘referer’: ‘https://faucetearner.org/faucet.php’,
    ‘sec-ch-ua’: ‘“Not/A)Brand”;v=“8”, “Chromium”;v=“126”, “Brave”;v=“126”’,
    ‘sec-ch-ua-mobile’: ‘?0’,
    ‘sec-ch-ua-platform’: ‘“Windows”’,
    ‘sec-fetch-dest’: ‘empty’,
    ‘sec-fetch-mode’: ‘cors’,
    ‘sec-fetch-site’: ‘same-origin’,
    ‘sec-gpc’: ‘1’,
    ‘user-agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36’,
    ‘x-requested-with’: ‘XMLHttpRequest’,
}

params = {
    ‘act’: ‘faucet’,
}

json_data = {}

response = requests.post(‘https://faucetearner.org/api.php’, params=params, cookies=cookies, headers=headers, json=json_data)
#print(response.text)

json_data2 = response.text
json_data2 = str(json_data2)
start_index = json_data2.find(“>”) + 1
end_index = json_data2.find(" XRP", start_index)
line1 = json_data2[start_index:end_index]
#print(line1)

if ‘Congratulations on receiving’ in response.text:
    print(f’{message1} {line1} {message2}')
else:
    print(‘You have already claimed, please wait for the next wave!’)


هذا الكود اريد ان يقوم بتكرار العمليه مع طلب الايميل والباسورد مره واحده