How to mannually start chromedriver

For some websites, using default chromedriver will be detected and blocked.
To avoid this, we need to start chrome and chromdriver manually.

In Windows

  1. Close all chrome browsers

  2. In the Chrome location open a terminal and enter

chrome.exe --remote-debugging-port=9222
{% asset_img "cmd.PNG" %}
  1. To make sure it works open browser with it should display
{% asset_img "localhost.PNG" %}

Configure Chrome Option

from import Options

chrome_option = Options()
chrome_option.add_experimental_option("debuggerAddress", "")

Add Chrome Option to the Driver, Now we can control the chrome driver with the current instance

curr_path = os.path.dirname(os.path.realpath("__file__"))

chrome_path = "/".join([curr_path,"cd","chromedriver.exe"])
driver = webdriver.Chrome(chrome_path, options=chrome_option)

   Reprint policy

《How to mannually start chromedriver》 by Isaac Zhou is licensed under a Creative Commons Attribution 4.0 International License