Skip to main content

A tool to download and install ChromeDriver.

Project description

Get ChromeDriver

PyPI - Python Version PyPI PyPI - Status PyPI - License

A tool to download and install ChromeDriver. Automatically download a ChromeDriver version for the current installed Chrome version. Or you can choose to download the beta release (if one is currently available), the stable release or another specific release. You can use this tool as a package import or as a command-line application.

Install

To install:

$ pip install get-chrome-driver

To upgrade:

$ pip install get-chrome-driver --upgrade

Usage

Install and use ChromeDriver with Selenium

import time
from get_chrome_driver import GetChromeDriver
from selenium import webdriver

# Install the driver:
# Downloads ChromeDriver for the installed Chrome version on the machine
# Adds the downloaded ChromeDriver to path
get_driver = GetChromeDriver()
get_driver.install()

# Use the installed ChromeDriver with Selenium
driver = webdriver.Chrome()
driver.get("https://google.com")
time.sleep(3)
driver.quit()

For downloading only

from get_chrome_driver import GetChromeDriver

get_driver = GetChromeDriver()

# Print the stable release version
print(get_driver.stable_release_version())

# Print the stable release download link
print(get_driver.stable_release_url())

# Print the download link of a specific release
print(get_driver.release_url('84.0.4147.30'))

# Auto download ChromeDriver for the installed Chrome version
# Optional: use output_path= to specify where to download the driver
# Optional: use extract=True to extract the file
get_driver.auto_download(extract=True)

# Download the stable driver release
# Optional: use output_path= to specify where to download the driver
# Optional: use extract=True to extract the zip file
get_driver.download_stable_release(extract=True)

# Download a specific driver release
# Optional: use output_path= to specify where to download the driver
# Optional: use extract=True to extract the file
get_driver.download_release('84.0.4147.30', extract=True)

Command-line

Print the stable release url of all platforms:

$ get-chrome-driver --latest-urls

Print the stable release version:

$ get-chrome-driver --stable-version

Print the stable release url:

$ get-chrome-driver --stable-url

Auto download ChromeDriver for the current installed Chrome version and extract the file:

$ get-chrome-driver --auto-download --extract

Download the stable release and extract the file:

$ get-chrome-driver --download-stable --extract

Download a specific release and extract the file:

$ get-chrome-driver --download-release 84.0.4147.30 --extract

The downloaded driver can be found at:

<current directory>/<chromedriver>/<version>/<bin>/<chromedriver>

Note: Beta release related options and functions will only work if one is currently available.

Options

--help                      Show help.

--beta-version              Print the beta release version.

--stable-version            Print the stable release version.

--latest-urls               Print the beta and stable release urls for all platforms.

--release-url               Print the url of a release.

--beta-url                  Print the beta release url.

--stable-url                Print the stable release url.

--auto-download             Download a ChromeDriver release for the installed Chrome Version.

--download-beta             Download the beta release.

--download-stable           Download the stable release.

--download-release          Download a specific release.

--extract                   Extract the compressed driver file.

--version                   Program version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

get-chrome-driver-1.1.28.tar.gz (11.5 kB view details)

Uploaded Source

File details

Details for the file get-chrome-driver-1.1.28.tar.gz.

File metadata

  • Download URL: get-chrome-driver-1.1.28.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for get-chrome-driver-1.1.28.tar.gz
Algorithm Hash digest
SHA256 7a79dd2831bf904f7a6403cb9b15911ea7182afd51e1fec523909ab07e6bb414
MD5 b1199c286f0c2137f50b347780b106b6
BLAKE2b-256 32aa7e7c0512122d7033c25f9a77e5178da68b1b65166baf08ff123c6935396c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page