more logical amazon claim logic

This commit is contained in:
piair 2022-12-20 12:42:00 +01:00
parent 45cd381c3a
commit 5d64ebdb29
1 changed files with 10 additions and 13 deletions

17
V4.py
View File

@ -71,8 +71,8 @@ def claim_amazon():
#amazon = search("> ([^ ]+) <", fcode)[1] #amazon = search("> ([^ ]+) <", fcode)[1]
fcode = driver.find_element(By.XPATH, "/html/body/div[1]/div[1]/main/div/div/div/div/div[1]/div/div[1]/div[2]/div[2]/div/div/div/div/div/div[2]/span").get_attribute("innerHTML") fcode = driver.find_element(By.XPATH, "/html/body/div[1]/div[1]/main/div/div/div/div/div[1]/div/div[1]/div[2]/div[2]/div/div/div/div/div/div[2]/span").get_attribute("innerHTML")
if fcode : if fcode :
webhookFailure.send(_mail) webhookSuccess.send(_mail)
webhookFailure.send(fcode) webhookSuccess.send(fcode)
return(1) return(1)
else : else :
LogError("impossible de localiser le code ", driver, _mail) LogError("impossible de localiser le code ", driver, _mail)
@ -349,17 +349,13 @@ def AllCard(): # fonction qui clique sur les cartes
] # verifie si on a toujours des cartes ] # verifie si on a toujours des cartes
except: except:
break break
for i in range(2): # don't seem useful for fixing error
try : try :
weekly_cards() weekly_cards()
break
except Exception as e: except Exception as e:
LogError(f"weekly_cards, try n°{i+1} \n {e}", driver, _mail) LogError(f"weekly_cards {e}", driver, _mail)
if i == 0 :
driver.refresh()
else :
CustomSleep(1800)
driver.refresh()
""" """
@ -916,6 +912,7 @@ def unban2():
except NotBanned : except NotBanned :
printf("you are not currently banned on this account") printf("you are not currently banned on this account")
def SavePointsFromFile(file): def SavePointsFromFile(file):
with open(file) as f: with open(file) as f:
reader = csv.reader(f) reader = csv.reader(f)