Skip to main content

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

Project description

py-chromedriver-autoinstaller

GitHub GitHub release (latest by date) PyPI

This repository is a fork of python-chromedriver-autoinstaller, renamed to py-chromedriver-autoinstaller. 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-autoinstaller

Usage

Import py-chromedriver-autoinstaller 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.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_chromedriver_autoinstaller-1.0.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for py_chromedriver_autoinstaller-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f5a236d68e7b0794caa8eb8f9a69e5516e79c11dee2207c130cf74d5b5894989
MD5 56f1100fc88f4b02d6c7733658bb8466
BLAKE2b-256 a748c442c059d5bd939b431f4d470ee278ea96262cc71f4326497d06486c5295

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for py_chromedriver_autoinstaller-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d685882d89fa4577277387c3f00a93f99420bbc7e7bbe29876e7dda02252a51
MD5 45291b52c4baa735a17cbeb72191b6dc
BLAKE2b-256 465458b979ca146213322b9b6ae07ea2534f24b76f91aef9966040e71603c4d1

See more details on using hashes here.

Supported by

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