not much change, look at the code
This commit is contained in:
parent
170627f5a7
commit
941656100c
13
V4.py
13
V4.py
|
@ -183,18 +183,19 @@ def claim_amazon():
|
||||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'Déverrouillez votre récompense')]").click()
|
driver.find_element(By.XPATH, "//span[contains( text( ), 'Déverrouillez votre récompense')]").click()
|
||||||
sleep(5)
|
sleep(5)
|
||||||
#amazon = search("> ([^ ]+) <", fcode)[1]
|
#amazon = search("> ([^ ]+) <", fcode)[1]
|
||||||
driver.refresh()
|
|
||||||
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")
|
||||||
CustomSleep(10)
|
|
||||||
if fcode :
|
if fcode :
|
||||||
webhookSuccess.send(_mail +" - "+ fcode)
|
webhookSuccess.send(_mail +" - "+ fcode)
|
||||||
|
return(1)
|
||||||
else :
|
else :
|
||||||
LogError("impossible de localiser le code ")
|
LogError("impossible de localiser le code ")
|
||||||
|
return(1)
|
||||||
|
|
||||||
else :
|
else :
|
||||||
LogError("la recuperation ne peux pas être automatique")
|
LogError("la recuperation ne peux pas être automatique")
|
||||||
|
return(0)
|
||||||
except Exception as e :
|
except Exception as e :
|
||||||
LogError(f'problème dans la recuperation : {e}')
|
LogError(f'problème dans la recuperation : {str(e)}')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -942,11 +943,13 @@ def LogPoint(account="unknown"): # log des points sur discord
|
||||||
else:
|
else:
|
||||||
webhookSuccess.send(f"{account} actuellement à {str(points)} points")
|
webhookSuccess.send(f"{account} actuellement à {str(points)} points")
|
||||||
|
|
||||||
|
if CLAIM_AMAZON and int(points) >= 7500:
|
||||||
|
if (claim_amazon() == 1) :
|
||||||
|
points -= 7500
|
||||||
|
|
||||||
if sql_enabled :
|
if sql_enabled :
|
||||||
add_to_database(account, points, sql_host, sql_usr, sql_pwd, sql_database)
|
add_to_database(account, points, sql_host, sql_usr, sql_pwd, sql_database)
|
||||||
|
|
||||||
if CLAIM_AMAZON and int(points) >= 7500:
|
|
||||||
claim_amazon()
|
|
||||||
|
|
||||||
|
|
||||||
def Fidelite():
|
def Fidelite():
|
||||||
|
|
Loading…
Reference in New Issue