Skip to main content

Automatically install chromedriver that supports the currently installed version of chrome.

Project description

py-chromedriver-installer

This repository is a fork of python-chromedriver-autoinstaller, renamed to py-chromedriver-installer. It improves upon the original by fixing issues with detecting Chrome versions on Windows and introducing a new function to retrieve the download URL for Chromedriver.

Key Updates

  • Fixed: Detection of Chrome versions on Windows.
  • New Feature: Added the get_driver_url function.

get_driver_url Function

This function retrieves the download URL for Chromedriver without performing the actual download. It serves as an alternative to the existing download_chromedriver function.

def get_download_url(path: Optional[AnyStr] = None, no_ssl: bool = False):

Installation

pip install py-chromedriver-installer

Usage

Import py-chromedriver-installer to automatically handle Chromedriver installation or fetch the driver URL.

Example: Auto-Installation

from selenium import webdriver
import py_chromedriver_installer  

py_chromedriver_installer.install()  # Automatically downloads the correct version of Chromedriver,
                                     # then adds it to PATH.

driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title

Example: Get Chromedriver Download URL

from py_chromedriver_installer import get_driver_url  

url = get_driver_url()  # Retrieves the Chromedriver download URL for the current Chrome version.
print("Chromedriver download URL:", url)

Authors & Contributors

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

py_chromedriver_autoinstaller-1.0.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

py_chromedriver_autoinstaller-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file py_chromedriver_autoinstaller-1.0.0.tar.gz.

File metadata

File hashes

Hashes for py_chromedriver_autoinstaller-1.0.0.tar.gz
Algorithm Hash digest
SHA256 645f9a8e90238b4d63b779fa1b62e52b1f0ce7a0fc10b213e089179254ee8a14
MD5 3bcc736b6febe7fbd9c64285ce7de0f8
BLAKE2b-256 d05a9bd445c5d874d2e3ba1564d3ed03f3eb1b27751ec616c9291451afc18d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_chromedriver_autoinstaller-1.0.0.tar.gz:

Publisher: workflow.yml on farhaanaliii/py-chromedriver-autoinstaller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_chromedriver_autoinstaller-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_chromedriver_autoinstaller-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2afb73c1d5f8c9d185583287f1e0631bada28b581f9782e12c1fc9ecdd627ee7
MD5 ef10dc5d860e4f65e4f8da0e55a1c910
BLAKE2b-256 c837757d319b9da925d3b56babd79ed8a8ab6141c416eccf1359d9f8dcbe73e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_chromedriver_autoinstaller-1.0.0-py3-none-any.whl:

Publisher: workflow.yml on farhaanaliii/py-chromedriver-autoinstaller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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