Advertisement

[Python] Selenium+Chrome 反向代理

阅读量:

用 selenium+Chrome 访问ICP/IP地址/域名信息备案管理系统

基于Selenium与Chrome浏览器的反爬虫识别技术应对策略

复制代码
    from selenium import webdriver
    import time
    
    
    def main():
    options = webdriver.ChromeOptions()
    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option('useAutomationExtension', False)
    driver = webdriver.Chrome(options=options)
    driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
        "source": """
        Object.defineProperty(navigator, 'webdriver', {
          get: () => undefined
        })
      """

全部评论 (0)

还没有任何评论哟~