--claim amazon
This commit is contained in:
parent
ab8ac50fb2
commit
bb5dbb3cbd
39
V4.py
39
V4.py
|
@ -36,8 +36,21 @@ def WaitUntilVisible(by, id, to = 20, browser = driver):
|
|||
print(f"element not found after {to}s")
|
||||
|
||||
|
||||
def claim_amazon():
|
||||
try :
|
||||
def claim_amazon(auto = True):
|
||||
def middle():
|
||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'ÉCHANGER UNE RÉCOMPENSE')]").click()
|
||||
sleep(5)
|
||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'CONFIRMER LA RÉCOMPENSE')]").click()
|
||||
countrycode = driver.find_element(By.ID, 'redeem-checkout-challenge-countrycode')
|
||||
phone = driver.find_element(By.ID, "redeem-checkout-challenge-fullnumber")
|
||||
sel = Select(countrycode)
|
||||
CC = input("enter start of number (33, ...) ")
|
||||
sel.select_by_value(CC)
|
||||
ph = input("entrez le numero de telephone : +33")
|
||||
send_keys_wait(phone, ph)
|
||||
driver.find_element(By.ID, "redeem-checkout-challenge-validate").click()
|
||||
|
||||
def start():
|
||||
driver.get("https://rewards.bing.com/redeem/000803000031")
|
||||
try :
|
||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'ÉCHANGER UNE RÉCOMPENSE')]").click()
|
||||
|
@ -48,10 +61,9 @@ def claim_amazon():
|
|||
driver.find_element(By.XPATH, "//span[contains( text( ), 'CONFIRMER LA RÉCOMPENSE')]").click()
|
||||
except :
|
||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'CONFIRM REWARD')]").click()
|
||||
|
||||
sleep(5)
|
||||
|
||||
if ("/rewards/redeem/orderhistory" in driver.page_source) :
|
||||
def end():
|
||||
driver.get("https://rewards.bing.com/redeem/orderhistory")
|
||||
try :
|
||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'Détails de la commande')]").click()
|
||||
|
@ -78,9 +90,24 @@ def claim_amazon():
|
|||
LogError("impossible de localiser le code ", driver, _mail)
|
||||
return(1)
|
||||
|
||||
try :
|
||||
start()
|
||||
|
||||
if ("/rewards/redeem/orderhistory" in driver.page_source) :
|
||||
end()
|
||||
|
||||
else :
|
||||
if auto:
|
||||
LogError("la recuperation ne peux pas être automatique", driver, _mail)
|
||||
return(0)
|
||||
else :
|
||||
middle()
|
||||
while ("Il existe un problème avec votre compte ou votre commande" in driver.page_source) :
|
||||
print("le numero de telephone est ban")
|
||||
driver.get("https://rewards.bing.com/redeem/000803000031")
|
||||
middle()
|
||||
end()
|
||||
|
||||
except Exception as e :
|
||||
LogError(f'problème dans la recuperation : {str(e)}', driver, _mail)
|
||||
|
||||
|
@ -417,7 +444,7 @@ def login():
|
|||
raise Banned()
|
||||
except Exception as e:
|
||||
LogError(f"login - 3 - {e}", driver, _mail)
|
||||
driver.close()
|
||||
driver.quit()
|
||||
CustomSleep(1200)
|
||||
driver = FirefoxDriver()
|
||||
return("STOP")
|
||||
|
@ -955,6 +982,8 @@ if CUSTOM_START:
|
|||
CustomStart(Credentials)
|
||||
elif UNBAN:
|
||||
unban2()
|
||||
elif CLAIM:
|
||||
claim_amazon(False)
|
||||
elif POINTS_FILE != "":
|
||||
SavePointsFromFile(POINTS_FILE)
|
||||
else:
|
||||
|
|
|
@ -33,6 +33,12 @@ parser.add_argument(
|
|||
action="store_true"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--claim",
|
||||
help="show claim",
|
||||
dest="claim",
|
||||
action="store_true"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-l",
|
||||
|
@ -73,6 +79,7 @@ parser.add_argument(
|
|||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
CLAIM = args.claim
|
||||
CUSTOM_START = args.override
|
||||
UNBAN = args.unban
|
||||
LOG = args.log
|
||||
|
|
|
@ -69,7 +69,7 @@ def printf2(txt, mail, LOG = LOG):
|
|||
|
||||
def check_ipv4(driver):
|
||||
driver.get("https://api64.ipify.org")
|
||||
elm = driver.find_element(By.TAG_NAME, "body")
|
||||
elm = driver.find_element(BY.TAG_NAME, "body")
|
||||
if len(elm.text.split('.')) == 4 :
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue