webdriver antibot 1

webdriver antibot

driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
     "source": """
          const newProto = navigator.__proto__
          delete newProto.webdriver
          navigator.__proto__ = newProto

Here is what the above code is Doing:
1. We’re using the Chrome DevTools Protocol to add a script to the page that will run on every new document.
2. We’re using the __proto__ property to access the prototype of the navigator object.
3. We’re deleting the webdriver property from the prototype.
4. We’re setting the prototype of the navigator object to the new prototype.

Similar Posts