【问题标题】:python selenium gmail automatonpython selenium gmail 自动机
【发布时间】:2021-08-13 07:16:32
【问题描述】:

我似乎无法自动登录 gmail。我的代码是正确的,但是一旦 selenium 输入用户名并单击下一步,它就不允许我输入密码。

以下是密码页面中显示的内容: 无法让您登录 此浏览器或应用程序可能不安全。了解更多 尝试使用其他浏览器。如果您已经在使用受支持的浏览器,则可以刷新屏幕并再次尝试登录。

有没有办法解决这个问题?

driver.get("https://accounts.google.com/signin/v2/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin")

#driver.maximize_window()

#driver.find_element_by_class_name("whsOnd").send_keys("email address")
#driver.find_element_by_class_name("VfPpkd-RLmnJb").click()

【问题讨论】:

标签: python selenium automation


【解决方案1】:

您可以使用https://pypi.org/project/undetected-chromedriver/,这是一个未被检测到的驱动程序。这应该可以。

【讨论】:

  • 你能指定如何使用它吗?我需要用这个代替我已经下载的chrome驱动吗?
  • 你可以把 import undetected_chromedriver.v2 as uc driver = uc.Chrome() with driver:
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-01
  • 2019-12-27
  • 1970-01-01
  • 1970-01-01
  • 2018-08-04
相关资源
最近更新 更多