简体   繁体   中英

Google Error - Log-in not possible, when trying to log in with Python selenium

log-in not possible (windows error)

How can i avoid this problem.

Whenever i try to log in on any google page it´s giving me this error, that i can´t log in and the browser might be not save.

Thx for your help

I suggest you retrieve cookies from your usual browser and add it to selenium browser to fake your session. Retrieve cookies from your browser as a JSON (with driver.get_cookie() or plug-in EditThisCookie )

Then add cookies to your browser with the method:

with open("your_cookies.json", "r") as f:
     cookie_json = json.load(f)
driver.add_cookie(cookie_json)

Instead of directly logging in to Google, you can do this through another service. For example, when you log in with google from here, google will not block you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM