标签:imp images tps 访问 mil webdriver manage import ges
from selenium import webdriver
options = webdriver.ChromeOptions()
# 设置为开发者模式,防止被各大网站识别出来使用了Selenium
# 屏蔽 windows.navigator.webdriver
options.add_experimental_option(‘excludeSwitches‘, [‘enable-automation‘])
# 不加载图片,加快访问速度
options.add_experimental_option(
"prefs", {"profile.managed_default_content_settings.images": 2})
driver = webdriver.Chrome(
executable_path=driver的存放路径,
options=options)
driver.get("https://www.baidu.com")
driver.quit()
标签:imp images tps 访问 mil webdriver manage import ges
原文地址:https://www.cnblogs.com/xiaozhuzhu520/p/14266546.html