From 150fb63e020ae4bdf680c5b61b88f41f85379507 Mon Sep 17 00:00:00 2001 From: jyhl Date: Wed, 29 Apr 2020 16:17:48 +0800 Subject: [PATCH] add options --- demo.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/demo.py b/demo.py index a8a0cf6..7114a10 100644 --- a/demo.py +++ b/demo.py @@ -65,6 +65,16 @@ chrome.webRequest.onAuthRequired.addListener( def get_chromedriver(use_proxy=False, user_agent=None): path = os.path.dirname(os.path.abspath(__file__)) chrome_options = webdriver.ChromeOptions() + + # 最大化窗口启动 + # chrome_options.add_argument("--start-maximized") + + # 如报错 chrome-extensions + # chrome_options.add_argument("--disable-extensions") + + # 防止被反爬 关闭webdriver flag + # chrome_options.add_experimental_option('excludeSwitches', ['enable-automation']) + if use_proxy: pluginfile = 'proxy_auth_plugin.zip'