From 08c069ca1e7e680eaa20c3632882a9f6bcaa9a5f Mon Sep 17 00:00:00 2001 From: piair Date: Sat, 3 Dec 2022 06:33:27 +0100 Subject: [PATCH] je suis un pro des regexp mdrr --- V4.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/V4.py b/V4.py index 4e85bdd..d31248c 100755 --- a/V4.py +++ b/V4.py @@ -642,10 +642,12 @@ def Fidelite(): choix = driver.find_element(By.CSS_SELECTOR, 'div[class="pull-left spacer-48-bottom punchcard-row"]') # pull-left spacer-48-bottom punchcard-row? USELESS ? nb = search("([0-9]) of ([0-9]) completed", driver.page_source) - if not nb: + if nb is None: nb = search("([0-9]) de ([0-9]) finalisé", driver.page_source) - if not nb : - search("([0-9]) licence(s) sur ([0-9]) disponible(s)", driver.page_source) + if nb is None : + nb = search("([0-9]) licence\(s\) sur ([0-9]) disponible\(s\)", driver.page_source) + if nb is None : + nb = [0,0,0] for i in range(int(nb[2]) - int(nb[1])): driver.refresh() CustomSleep(2)