【问题标题】:Selenium + Python opening chrome with session passwordSelenium + Python 使用会话密码打开 chrome
【发布时间】:2022-10-23 23:41:20
【问题描述】:

我正在尝试在 python3 和 Selenium 中使用密码会话打开 chrome 浏览器 这是我的代码:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service

options = Options();
options.add_argument(r"--user-data-dir=/home/username/.config/google-chrome/")
options.add_argument(r'--profile-directory=User Profile')
service = Service('/opt/google/chrome/chromedriver')
driver = webdriver.Chrome(service=service, options=options)

它用我的个人资料打开了我的 chrome,但删除了所有 cookie 和密码连接。

如何使用保存的密码和会话打开 chrome?

【问题讨论】:

    标签: python selenium-webdriver selenium-chromedriver


    【解决方案1】:

    您正在使用 linux,尝试将未检测到的 chromedriver 作为 webdriver

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-15
      • 2018-08-25
      • 2018-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-22
      相关资源
      最近更新 更多