📌  相关文章
📜  默认浏览器使用 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:44.456000             🧑  作者: Mango

代码示例1
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument("--user-data-dir=THE/PATH/TO/YOUR/PROFILE") # change to profile path
chrome_options.add_argument('--profile-directory=Profile 1')

browser = webdriver.Chrome(executable_path="PATH/TO/cromedriver.exe", chrome_options=chrome_options) # change the executable_path too