This commit is contained in:
piair 2022-04-11 12:48:22 +02:00
parent c3367084e1
commit 9f3ff4d230
1 changed files with 4 additions and 2 deletions

6
V4.py
View File

@ -683,6 +683,8 @@ def Fidelite(lien):
if not nb : if not nb :
nb = search("([0-9]) de ([0-9]) finalisé",driver.page_source) nb = search("([0-9]) de ([0-9]) finalisé",driver.page_source)
for i in range(int(nb[2])-int(nb[1])): for i in range(int(nb[2])-int(nb[1])):
driver.refresh()
CustomSleep(2)
choix = driver.find_element(By.CLASS_NAME,'spacer-48-bottom') choix = driver.find_element(By.CLASS_NAME,'spacer-48-bottom')
ButtonText = search('<span class=\"pull-left margin-right-15\">([^<^>]+)</span>',choix.get_attribute("innerHTML"))[1] ButtonText = search('<span class=\"pull-left margin-right-15\">([^<^>]+)</span>',choix.get_attribute("innerHTML"))[1]
bouton = driver.find_element(By.XPATH, f'//span[text()="{ButtonText}"]') bouton = driver.find_element(By.XPATH, f'//span[text()="{ButtonText}"]')
@ -781,7 +783,7 @@ def CustomStart(Credentials):
_mail =Credentials[ids.index(i)][0] _mail =Credentials[ids.index(i)][0]
_password = Credentials[ids.index(i)][1] _password = Credentials[ids.index(i)][1]
driver = FirefoxPC() driver = FirefoxPC()
driver.implicitly_wait(10) driver.implicitly_wait(7)
login() login()
if "tout" in Actions : if "tout" in Actions :
@ -838,7 +840,7 @@ else :
printf("debut du driver") printf("debut du driver")
driver = FirefoxPC() driver = FirefoxPC()
printf("driver demarré") printf("driver demarré")
driver.implicitly_wait(10) driver.implicitly_wait(7)
try : try :
DailyRoutine() DailyRoutine()