Skip to main content

Script to automatically install the ChromeDriver release compatible with the client's Chrome version. Supports all versions of Chrome.

Project description

chromedriver_autoinstall

Automatically downloads the version of ChromeDriver compatible with the client's version of Chrome. Supports all versions of Chrome. Can be imported as a module and used to automatically reinstall ChromeDriver in its most updated/compatible version for any program that requires it.

Install:

Python 3.6 or higher is required

pip install chromedriver_autoinstall

Usage:

  • To download chromedriver in the current directory, run install_chromedriver.
  • To use the autoinstaller as part of a program, write import chromedriver_autoinstall in your file. See the example below for this use case.

Quick Example:

from selenium import webdriver
import os
import chromedriver_autoinstall
import time

PATH = f"./chromedriver-{chromedriver_autoinstall.get_platform()}/chromedriver"
URL = "https://github.com/RoastSea8/chromedriver_autoinstall"

def main():
    chromedriver_autoinstall.install()
    # chromedriver_autoinstall.script.out(f"chmod +x {PATH}") # MacOS only
    # os.chmod(PATH, 0o755) # MacOS only
    driver = webdriver.Chrome()
    driver.get(URL)
    time.sleep(1000)

if __name__ == "__main__":
    main()

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

chromedriver_autoinstall-0.0.8.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

chromedriver_autoinstall-0.0.8-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file chromedriver_autoinstall-0.0.8.tar.gz.

File metadata

File hashes

Hashes for chromedriver_autoinstall-0.0.8.tar.gz
Algorithm Hash digest
SHA256 610e6d2b8ca80c9f64d549b51ed8f41dab35dbd50aaece52f536d015a0de7db0
MD5 0946a14f03729f06f38e43e664b27a3d
BLAKE2b-256 f417114b81800937faea2dd787b7dd795ed12081005f42611a462ed8b209bf1d

See more details on using hashes here.

Provenance

File details

Details for the file chromedriver_autoinstall-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for chromedriver_autoinstall-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3475776ae658eb1217a6cc18ddb9a46df3f592334d9592084cad70124c27ebc8
MD5 b78fac0b23247f470669e621d35e84e9
BLAKE2b-256 0727089fdc834ff39cd32d3e3f0e8636450201da9b8dba7ee5d26245bf9b798d

See more details on using hashes here.

Provenance

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