Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 不能';t登录到谷歌帐户_Python 3.x_Google Chrome_Selenium Webdriver_Selenium Chromedriver - Fatal编程技术网

Python 3.x 不能';t登录到谷歌帐户

Python 3.x 不能';t登录到谷歌帐户,python-3.x,google-chrome,selenium-webdriver,selenium-chromedriver,Python 3.x,Google Chrome,Selenium Webdriver,Selenium Chromedriver,尝试自动登录Google帐户显示: “无法让您登录,浏览器或应用程序可能不安全。” 我在谷歌安全设置中启用了“允许不太安全的应用”选项,但这并没有解决问题。这是我的密码: from selenium import webdriver import time from selenium.webdriver.support.ui import Select driver = webdriver.Chrome() googlesheet = 'google address' driver.get(

尝试自动登录Google帐户显示:

“无法让您登录,浏览器或应用程序可能不安全。”

我在谷歌安全设置中启用了“允许不太安全的应用”选项,但这并没有解决问题。这是我的密码:

from selenium import webdriver
import time
from selenium.webdriver.support.ui import Select

driver = webdriver.Chrome()
googlesheet = 'google address'

driver.get(googlesheet) 
time.sleep(2)

# login
login = driver.find_element_by_id('identifierId')
login.send_keys('')

next = driver.find_element_by_xpath('//*[@id="identifierNext"]/span/span').click()
time.sleep(2)

password = driver.find_element_by_xpath('//*[@id="password"]/div[1]/div/div[1]/input')
password.send_keys('')

sign = driver.find_element_by_xpath('//*[@id="passwordNext"]/span').click()