Mac安装Chromedriver

Mac安装Chromedriver

Brew Install

在终端中输入

brew install chromedriver

可能会出现以下文字

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
.........此处省去一万行..........
Error: No available formula with the name "chromedriver" 
It was migrated from homebrew/core to homebrew/cask.
You can access it again by running:
  brew tap homebrew/cask
And then you can install it by running:
  brew cask install chromedriver

按照上面的提示 输入

brew cask install chromedriver

如果顺利会出现

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
cfn-lint

==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 4113, done.
remote: Counting objects: 100% (4113/4113), done.
remote: Compressing objects: 100% (4101/4101), done.
remote: Total 4113 (delta 24), reused 853 (delta 10), pack-reused 0
Receiving objects: 100% (4113/4113), 1.32 MiB | 126.00 KiB/s, done.
Resolving deltas: 100% (24/24), done.
Checking out files: 100% (4094/4094), done.
Tapped 1 command and 4005 casks (4,119 files, 4.2MB).
==> Satisfying dependencies
==> Downloading https://chromedriver.storage.googleapis.com/73.0.3683.68/chromedriver_mac64.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'chromedriver'.
==> Installing Cask chromedriver
==> Linking Binary 'chromedriver' to '/usr/local/bin/chromedriver'.
  chromedriver was successfully installed!

手动下载

查看你电脑上浏览器的版本:


Mac安装Chromedriver_第1张图片
D8F3CCC2-00C1-4E8B-8383-0BA944507CC5.png
  • 打开:http://chromedriver.storage.googleapis.com/index.html

  • 查找你浏览器版本的目录


    Mac安装Chromedriver_第2张图片
    B41E144F-E1DB-4DA0-9001-906BB2685E63.png
  • 下载对应系统的zip文件


    Mac安装Chromedriver_第3张图片
    16C60A0A-49C0-478C-82DA-89BCE9ADEFC6.png
  • 解压zip文件

  • 将解压得到的文件放到指定目录


    Mac安装Chromedriver_第4张图片
    90E9FD3C-F0DF-41A0-922F-9EA07B4E78C9.png

相关链接

  • :https://www.jianshu.com/p/a9df5135a3a3

  • CSDN:https://blog.csdn.net/ZuoWeiXiaoDuZuoZuo/article/details/89498886

  • ilongge.cn:http://ilongge.cn/2019/04/24/Mac-Install-Chromedriver/

你可能感兴趣的:(Mac安装Chromedriver)