如何在没有硒的情况下删除动态网站

时间:2020-09-19 23:14:20

标签: python selenium selenium-chromedriver

我正面临一个问题,希望任何人都可以帮助我。 我试图在python上使用selenium包抓取网页,但它不断检测到我在使用selenium并将我重定向到我无法使用的登录页面。 我尝试使用伪造的代理,但仍能检测到我,我尝试在chrome驱动程序中更改“ $ cdc”,但仍然无法正常工作。非常感谢有人可以帮助我。 这是我正在使用的代码:

options = webdriver.ChromeOptions()
ua = UserAgent()
userAgent = ua.random
options.add_argument('--ignore-certificate-errors')
options.add_argument('--incognito')
options.add_argument("--window-size=1920,1080")
options.add_argument('enable-automation')
options.add_argument(f'user-agent={userAgent}')
#options.add_argument('--headless')
driver = webdriver.Chrome()
driver.get("https://www.mcmaster.com/nuts/hex-nuts/medium-strength-steel-hex-nuts-grade-5/")

0 个答案:

没有答案