This commit is contained in:
piair 2023-04-13 22:38:27 +02:00
parent f8f3ff2382
commit 8d53a2b30b
2 changed files with 6 additions and 5 deletions

9
V5.py
View File

@ -234,7 +234,7 @@ def all_cards():
liste[i].click()
if len(driver.window_handles) > 1 :
driver.switch_to.window(driver.window_handles[1])
try_play()
try_play(driver.title)
close_tab(driver.window_handles[1])
try :
driver.refresh()
@ -243,7 +243,7 @@ def all_cards():
printf(f"carte {i} not okay. Retrying.")
liste[i].click()
driver.switch_to.window(driver.window_handles[1])
try_play()
try_play(driver.title)
close_tab(driver.window_handles[1])
except :
pass
@ -255,6 +255,7 @@ def all_cards():
log_error("no new windows", driver)
custom_sleep(3)
def welcome_tour(elm):
try :
driver.find_element(By.CSS_SELECTOR, '[class="welcome-tour-next-button c-call-to-action c-glyph"]').click()
@ -272,12 +273,14 @@ def welcome_tour(elm):
sleep(5)
driver.find_element(By.CSS_SELECTOR, '[class="c-glyph glyph-cancel"]').click()
def spotify():
custom_sleep(5)
driver.find_element(By.CSS_SELECTOR, '[data-bi-id="spotify-premium gratuit"]').click()
custom_sleep(5)
close_tab(driver.window_handles[1])
def promo():
elm = driver.find_element(By.ID, "promo-item")
while elm:
@ -296,8 +299,6 @@ def promo():
# Find out which type of action to do
def try_play(nom="inconnu"):
if (nom=="inconnu"):
nom = driver.title
def play(number):
if number == 8 or number == 9:
try:

View File

@ -1 +1 @@
v5.8.0
v5.8.1