diff --git a/V4.py b/V4.py index 328cef1..50e77c1 100644 --- a/V4.py +++ b/V4.py @@ -622,7 +622,7 @@ def LogPoint(account="unknown"): #log des points sur discord elem = driver.find_element(By.CSS_SELECTOR, '[title="Microsoft Rewards"]') elem.click() - driver.switch_to.window(driver.window_handles[1]) + driver.switch_to.window(driver.window_handles[len(driver.window_handles) - 1]) CustomSleep(uniform(10,20)) try : point = search("availablePoints\":([\d]+)",driver.page_source)[1]