After a lot of Google searching, I got my python script to login with Selenium, but now the page is telling me that:
This browser or app may not be secure. Learn more Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in.
Is there anyway around this? Here is my current script.
from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome(ChromeDriverManager().install()) driver.get("https://accounts.google.com/signin/v2/identifier") email = driver.find_element_by_id('identifierId') email.click() email.send_keys(username) email.send_keys(Keys.ENTER) actions = ActionChains(driver) actions.send_keys(password+Keys.ENTER) actions.perform()
Sending keys directly to the password field wasn't working so I tried sending keys to the browser itself and now I'm getting this error. I don't know how to proceed further.
Edit: Toggling Less secure app access did not work: https://stackoverflow.com/a/59607923/11343425