Selenium - Unable to login ( unsecured browser )

Asked

Viewed 231 times

1

Hello, good evening, I am trying to develop a python web bot, using the library Selenium and webdrive_manager, but when I try to log in to my google account using the browser that the bot is operating, it returns me an error saying that it was not possible to login by the browser not to be safe. Can anyone help me? Follow the error and the code below:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

browser = webdriver.Chrome(ChromeDriverManager().install())
browser.get('https://classroom.google.com/u/0/h')

error: inserir a descrição da imagem aqui

I do not know if it is some Google defense mechanism or some problem with the code, I thank you already!! there is, and out of curiosity, the bot would be to access the online classes automatically, so we need to log in to this account

2 answers

1

You probably have to activate less secure apps on https://myaccount.google.com/lesssecureapps, when accessing click the button where it is marked OFF, as in the image below

Acesso a app menos seguro

Another possibility (but less likely) is that your google account uses double-factor (but I’m not sure about that).

Still if the intention is to access random accounts, which can not define this permission, then I believe you will not succeed (I have not tested on other drivers), this permission system is precisely for user safety.

-2

Browser other questions tagged

You are not signed in. Login or sign up in order to post.