由于某种原因,在添加一系列 WebDriver 选项后,我的 Python 代码显示为无法访问。有谁知道为什么会发生这种情况以及如何解决它?

代码本身如下:
class DriverOptions(object):
def __init__(self):
self.options = Options()
self.options.add_argument('--no-sandbox')
self.options.add_argument('--start-maximized')
self.options.add_argument('--start-fullscreen')
self.options.add_argument('--single-process')
self.options.add_argument('--disable-dev-shm-usage')
self.options.add_argument("--incognito")
self.options.add_argument('--disable-blink-features=AutomationControlled')
self.options.add_argument('--disable-blink-features=AutomationControlled')
self.options.add_experimental_option('useAutomationExtension', False)
self.options.add_experimental_option("excludeSwitches", ["enable-automation"])
self.options.add_argument("disable-infobars")
self.helperSpoofer = Spoofer()
self.options.add_argument('user-agent={}'.format(self.helperSpoofer.userAgent))
self.options.add_argument('--proxy-server=%s' % self.helperSpoofer.ip)
Run Code Online (Sandbox Code Playgroud) selenium web-crawler python-3.x selenium-chromedriver chrome-options