diff --git a/V5.py b/V5.py index bc68ff2..60befd0 100755 --- a/V5.py +++ b/V5.py @@ -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: diff --git a/version b/version index 4a62af8..b589c59 100644 --- a/version +++ b/version @@ -1 +1 @@ -v5.8.0 +v5.8.1