Can a website detect when you are using selenium with chromedriver?

后端 未结 19 2754
情歌与酒
情歌与酒 2020-11-21 05:41

I\'ve been testing out Selenium with Chromedriver and I noticed that some pages can detect that you\'re using Selenium even though there\'s no automation at all. Even when I

19条回答
  •  Happy的楠姐
    2020-11-21 06:17

    I've found changing the javascript "key" variable like this:

    //Fools the website into believing a human is navigating it
            ((JavascriptExecutor)driver).executeScript("window.key = \"blahblah\";");
    

    works for some websites when using Selenium Webdriver along with Google Chrome, since many sites check for this variable in order to avoid being scrapped by Selenium.

提交回复
热议问题