From 5bfab7789ab508a3f5231bcac8d13a6af972f158 Mon Sep 17 00:00:00 2001 From: Txt-exe Date: Sun, 9 Jul 2023 20:16:51 -0500 Subject: [PATCH 1/2] adjusted driver variable to match Selenium 4.0 changes --- spotifystreambot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spotifystreambot.py b/spotifystreambot.py index 4604f02..5b47c99 100644 --- a/spotifystreambot.py +++ b/spotifystreambot.py @@ -2,6 +2,7 @@ from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from selenium.webdriver.chrome.options import Options +from webdriver_manager.chrome import ChromeDriverManager from selenium.common.exceptions import NoSuchElementException import random import requests @@ -104,7 +105,7 @@ def main(): drivers = [] for account in accounts: - driver = webdriver.Chrome(service=Service(driver_path), options=chrome_options) + driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options) username, password = account.strip().split(':') From 74ba410a49a29c267eea4caab43ba850305146f4 Mon Sep 17 00:00:00 2001 From: Txt-exe Date: Sun, 9 Jul 2023 20:58:19 -0500 Subject: [PATCH 2/2] Added delay between username and password input --- spotifystreambot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spotifystreambot.py b/spotifystreambot.py index 5b47c99..968c35e 100644 --- a/spotifystreambot.py +++ b/spotifystreambot.py @@ -117,6 +117,7 @@ def main(): password_input = driver.find_element(By.CSS_SELECTOR, "input#login-password") username_input.send_keys(username) + time.sleep(3) password_input.send_keys(password) driver.find_element(By.CSS_SELECTOR, "button[data-testid='login-button']").click()