# 到哪裡下載最新的 ChromeDriver？

**URL:** https://vip.studycamp.tw/t/%E5%88%B0%E5%93%AA%E8%A3%A1%E4%B8%8B%E8%BC%89%E6%9C%80%E6%96%B0%E7%9A%84-chromedriver%EF%BC%9F/7637
**Category:** 學習輔助軟體／工具
**Created:** [2024年十一月1日 09:54 UTC](https://vip.studycamp.tw/t/%E5%88%B0%E5%93%AA%E8%A3%A1%E4%B8%8B%E8%BC%89%E6%9C%80%E6%96%B0%E7%9A%84-chromedriver%EF%BC%9F/7637 "2024-11-01T09:54:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sky](https://vip.studycamp.tw/user_avatar/vip.studycamp.tw/sky/32/8098_2.png) [@sky](https://vip.studycamp.tw/u/sky)
#### Post date: [2024年十一月1日 09:54 UTC](https://vip.studycamp.tw/t/%E5%88%B0%E5%93%AA%E8%A3%A1%E4%B8%8B%E8%BC%89%E6%9C%80%E6%96%B0%E7%9A%84-chromedriver%EF%BC%9F/7637/1 "2024-11-01T09:54:53Z")

</div>

> 想下載最新的 `chromedriver`，卻在官網不斷的鬼打牆。
> 
> 最後在奇怪的地方找到，特別記錄下來。幫未來的自己（因為我忘性奇佳）或有類似困擾的朋友，省些時間。

如果你只想趕快下載，懶得看細節或搜尋的過程，這裡是 **[下載連結](https://googlechromelabs.github.io/chrome-for-testing/#stable)** （`https://googlechromelabs.github.io/chrome-for-testing/#stable`）：

## [下載 ChromeDriver](https://googlechromelabs.github.io/chrome-for-testing/#stable)

點 [**Stable**](https://googlechromelabs.github.io/chrome-for-testing/#stable) 裡的 **chromedriver** 即可（提供 chrome, chromedriver, chrome-headless-shell 下載， 有 Stable, Beta, Dev, Canary 四種版本）。

* * *

為什麼我需要安裝新的 ChromeDriver？

## ▌selenium.webdriver 爬蟲

ChromeDriver 有兩種實作方式：

1. **一般的 `chromedriver`** ：使用 `selenium.webdriver` 和 `chromedriver`。

2. **`undetected_chromedriver` 的特殊機制** ：使用 `undetected_chromedriver`（簡稱 `uc`）

我之前 udemy 限免優惠的爬蟲，是使用 `uc` 方式開啟 udemy 的網頁。這次想寫個爬蟲程式，取得一位法師的結緣電子書連結，因為碰到下述問題，就決定研究一下。

### 錯誤訊息

在使用 selenium.webdriver 時，如果與 Chrome 瀏覽器的版本不合，會出現以下錯誤訊息（版本編號與你的安裝有關）：

> The chromedriver version (126.0.6478.182) detected in PATH at D:\Dev\chromedriver\chromedriver.exe might not be compatible with the detected chrome version (130.0.6723.71); currently, chromedriver 130.0.6723.91 is recommended for chrome 130.\*, so it is advised to delete the driver in PATH and retry

## ▌終於找到下載處

原本文章中，先敘述了鬼打牆的過程，最後才說明是在哪裡找到的。

為了體貼讀者，決定先說後來是怎麼找到的（給你釣竿、教你釣魚，而不是直接給你一條魚就好），再來說鬼打牆的過程，讓不感興趣的朋友，可以跳過。

我最後是在政府的無障礙網站，找到這篇「**[有關新版檢測工具出現「瀏覽器開啟錯誤，請檢查 ChromeDriver 與本機 Chrome瀏覽器 的版本是否相應」的解決方式](https://accessibility.moda.gov.tw/Questions/Detail/4467?Category=20)**」，裡面提到了下載網址 `https://googlechromelabs.github.io/chrome-for-testing/#stable`（或點擊下面這個連結）。

## [下載 ChromeDriver](https://googlechromelabs.github.io/chrome-for-testing/#stable)

 ![Chrome for Testing availability](https://vip.studycamp.tw/uploads/default/original/2X/8/87eaad02e034c0b7d29eb2a9eb5c04dd296e6621.png)

  
那麼我是怎麼找到這個無障礙網站的呢？google 關鍵字「chromedriver download」第四筆資料：

> [無障礙網路空間服務網  
> https://accessibility.moda.gov.tw › Questions › Detail  
> ](https://accessibility.moda.gov.tw/Questions/Detail/4467?Category=20)
> 
> [ **請檢查ChromeDriver與本機Chrome瀏覽器的版本是否相應」的 …**  
> ](https://accessibility.moda.gov.tw/Questions/Detail/4467?Category=20)
> 
> 1. 請至 ChromeDriver 測試工具下載網頁（[Chrome for Testing availability](https://googlechromelabs.github.io/chrome-for-testing/#stable) …  
> ChromeDriver win64 平台版本之連結URL，下載chromedriver-win32.zip 或 …

## ▌鬼打牆過程

> 本段文章中的所有連結，通通不用點擊，除非你也想鬼打牆。

不知道為什麼，**[提供下載的官網](https://developer.chrome.com/docs/chromedriver/downloads?hl=zh-tw)** 中，所提供的版本是舊的（114，目前都到130了，有夠離譜）。

在不斷鬼打牆的過程中，官網始終找不到相關資訊。我又不想從非官方的網頁下載，誰知道會被加進什麼東東。

後來想到 Chrome 是 open source 的，也許我可以嘗試到 github 中，看看有沒有相關資訊，結果在 **Selenium** （而不是 **Chrome** ）的 github 找到相關說明：

> **[ChromeDriver](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver)**
>
> A browser automation framework and ecosystem. Contribute to SeleniumHQ/selenium development by creating an account on GitHub.

上面的連結，你可以不用看，因為只是告訴你 **[Selenium 官網的相關連結](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/)**，而且點擊後還會 redirect 到 **[這裡](https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/)**。

然後在網頁中一行不起眼的敘述中，找到下載的地方（下圖藍色標註處）。

 ![The ChromeDriver latest version can be downloaded from](https://vip.studycamp.tw/uploads/default/original/2X/3/3a1bc9f10456c86ae412b408b9f0494cdb7283ff.png)

連結是 `https://chromedriver.chromium.org/downloads`，但點擊後同樣 redirect 到最原點 `https://developer.chrome.com/docs/chromedriver/downloads?hl=zh-tw`。

* * *

## ▌資料來源

[**Chrome for Testing availability**](https://googlechromelabs.github.io/chrome-for-testing/#stable)
