less errors
This commit is contained in:
parent
4814dfed46
commit
550e36b954
10
V5.py
10
V5.py
@ -298,13 +298,13 @@ def all_cards():
|
|||||||
|
|
||||||
|
|
||||||
def promo():
|
def promo():
|
||||||
for i in range(10):
|
for i in range(5):
|
||||||
elm = driver.find_element(By.ID, "promo-item")
|
elm = driver.find_element(By.ID, "promo-item")
|
||||||
wait_until_visible(By.ID, "promo-item", 5, driver)
|
wait_until_visible(By.ID, "promo-item", 5, driver)
|
||||||
if not elm:
|
if not elm:
|
||||||
break
|
break
|
||||||
if i > 8 :
|
if i > 3 :
|
||||||
log_error("chelou, plus de 8 truc", driver)
|
log_error("plus de 3 promo cards, probablement une pa skipable", driver)
|
||||||
try :
|
try :
|
||||||
elm.click()
|
elm.click()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -652,8 +652,12 @@ def fidelity():
|
|||||||
log_error(e)
|
log_error(e)
|
||||||
if driver.current_url != "https://rewards.bing.com":
|
if driver.current_url != "https://rewards.bing.com":
|
||||||
driver.get("https://rewards.bing.com")
|
driver.get("https://rewards.bing.com")
|
||||||
|
try :
|
||||||
pause = driver.find_element(By.CSS_SELECTOR, f'[class="c-action-toggle c-glyph f-toggle glyph-pause"]') # mettre le truc en pause
|
pause = driver.find_element(By.CSS_SELECTOR, f'[class="c-action-toggle c-glyph f-toggle glyph-pause"]') # mettre le truc en pause
|
||||||
pause.click()
|
pause.click()
|
||||||
|
except Exception as e:
|
||||||
|
printf(f"erreur : probablement pas de cartes {e}")
|
||||||
|
return("no cards")
|
||||||
cartes = driver.find_elements(By.CSS_SELECTOR, f'[ng-repeat="item in $ctrl.transcludedItems"]')
|
cartes = driver.find_elements(By.CSS_SELECTOR, f'[ng-repeat="item in $ctrl.transcludedItems"]')
|
||||||
nb_cartes = len(cartes)
|
nb_cartes = len(cartes)
|
||||||
checked_list_all = driver.find_elements(By.CSS_SELECTOR, f'[ng-if="$ctrl.complete"]')
|
checked_list_all = driver.find_elements(By.CSS_SELECTOR, f'[ng-if="$ctrl.complete"]')
|
||||||
|
Loading…
Reference in New Issue
Block a user