Close streak protection
This commit is contained in:
parent
3c74aa025e
commit
402b8cd3ef
15
V6.py
15
V6.py
|
@ -220,6 +220,19 @@ def all_cards():
|
||||||
custom_sleep(1.5)
|
custom_sleep(1.5)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def check_streak_protection() -> bool:
|
||||||
|
"""
|
||||||
|
Ne perdez plus jamais votre série !
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
streak_protection_close = driver.find_element(By.ID, "streak-protection-popup-close-cross")
|
||||||
|
streak_protection_close.click()
|
||||||
|
custom_sleep(1.5)
|
||||||
|
|
||||||
|
return True
|
||||||
|
except exceptions.NoSuchElementException:
|
||||||
|
return False
|
||||||
|
|
||||||
driver.get("https://rewards.bing.com")
|
driver.get("https://rewards.bing.com")
|
||||||
wait_until_visible(By.CLASS_NAME, "c-card-content", 10, driver)
|
wait_until_visible(By.CLASS_NAME, "c-card-content", 10, driver)
|
||||||
|
|
||||||
|
@ -274,6 +287,7 @@ def all_cards():
|
||||||
|
|
||||||
custom_sleep(1.5)
|
custom_sleep(1.5)
|
||||||
check_welcome_tour()
|
check_welcome_tour()
|
||||||
|
check_streak_protection()
|
||||||
driver.execute_script("arguments[0].scrollIntoView();", card_list[i])
|
driver.execute_script("arguments[0].scrollIntoView();", card_list[i])
|
||||||
custom_sleep(1.5)
|
custom_sleep(1.5)
|
||||||
card_list[i].click()
|
card_list[i].click()
|
||||||
|
@ -291,6 +305,7 @@ def all_cards():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
check_welcome_tour()
|
check_welcome_tour()
|
||||||
|
check_streak_protection()
|
||||||
driver.execute_script("arguments[0].scrollIntoView();", card_list[i])
|
driver.execute_script("arguments[0].scrollIntoView();", card_list[i])
|
||||||
card_list[i].click()
|
card_list[i].click()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue