标签:prope ++ eva nts rom def mat element class
options = webdriver.ChromeOptions() options.add_experimental_option(‘excludeSwitches‘, [‘enable-automation‘]) # 设置为开发者模式 browser = webdriver.Chrome(options = options) browser.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", { "source": """Object.defineProperty(navigator, ‘webdriver‘, {get: () => undefined})""", }) # 传过来的url url = request.args.get(‘www.baidu.com‘) # 请求 browser.get(url)
browser.set_window_size(1300, 800)
# 显示等待下一页元素加载完成 WebDriverWait(browser, 1000).until( EC.presence_of_all_elements_located( (By.CLASS_NAME, ‘fui-next‘) ) )
标签:prope ++ eva nts rom def mat element class
原文地址:https://www.cnblogs.com/zyfeng/p/13503559.html