selenium.add_argument 常用参数
chrome_options.add_argument(--user-agent="") # 设置请求头的User-Agent
chrome_options.add_argument(--window-size=1280x1024) # 设置浏览器分辨率(窗口大小)
chrome_options.add_argument(--start-maximized) # 最大化运行(全屏窗口),不设置,取元素会报错
chrome_options.add_argument(--disable-infobars) # 禁用浏览器正在被自动化程序控制的提示
chrome_options.add_argument(--incognito) # 隐身模式(无痕模式)
chrome_options.add_argument(--hide-scrollbars) # 隐藏滚动条, 应对一些特殊页面
chrome_options.add_argument(--disable-javascript) # 禁用javascript
chrome_options.add_argument(--blink-settings=imagesEnabled=false) # 不加载图片, 提升速度
chrome_options.add_argument(--headless) # 浏览器不提供可视化页面
chrome_options.add_argument(--ignore-certificate-errors) # 禁用扩展插件并实现窗口最大化
chrome_options.add_argument(--disable-gpu) # 禁用GPU加速
chrome_options.add_argument(–disable-software-rasterizer)
chrome_options.add_argument(--disable-extensions)
chrome_options.add_argument(--start-maximized)