Skip to main content

A tool to download and install GeckoDriver.

Project description

Get GeckoDriver

PyPI - Python Version PyPI PyPI - License

tests

A tool to download and install GeckoDriver. Download the latest version or another specific version. You can use this tool as a package import or as a command-line application.

Install

To install:

pip install get-gecko-driver

To upgrade:

pip install get-gecko-driver --upgrade

Usage

Install and use GeckoDriver with Selenium

import time
from get_gecko_driver import GetGeckoDriver
from selenium import webdriver

# Install the driver:
# Downloads the latest GeckoDriver version
# Adds the downloaded GeckoDriver to path
get_driver = GetGeckoDriver()
get_driver.install()

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

For downloading only

from get_gecko_driver import GetGeckoDriver

get_driver = GetGeckoDriver()

# Print the latest version
print(get_driver.latest_version())

# Print the latest version download link
print(get_driver.latest_version_url())

# Print the download link of a specific version
print(get_driver.version_url('0.27.0'))

# Download the latest driver version
# Optional: use output_path= to specify where to download the driver
# Optional: use extract=True to extract the file
get_driver.download_latest_version(extract=True)

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

Command-line

Print the latest version url of all platforms:

get-gecko-driver --latest-urls

Print the latest version:

get-gecko-driver --latest-version

Print the latest version url:

get-gecko-driver --latest-url

Download the latest version and extract the file:

get-gecko-driver --download-latest --extract

Download a specific version and extract the file:

get-gecko-driver --download-version 0.27.0 --extract

The downloaded driver can be found at:

<current directory>/<geckodriver>/<version>/<bin>/<geckodriver>

Options

--help                      Show help.

--latest-version            Print the latest version.

--latest-urls               Print the latest version urls for all platforms.

--version-url               Print the version url.

--latest-url                Print the latest version url.

--download-latest           Download the latest version.

--download-version          Download a specific version.

--extract                   Extract the compressed driver file.

--driver-filename           Print the driver filename.

--version                   App 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_gecko_driver-1.5.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

get_gecko_driver-1.5.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file get_gecko_driver-1.5.1.tar.gz.

File metadata

  • Download URL: get_gecko_driver-1.5.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for get_gecko_driver-1.5.1.tar.gz
Algorithm Hash digest
SHA256 40cc65e8f2931283702ca4c56bda7aa7c99d742ce6e4285869755ec569ec1f7a
MD5 265e9e147380ba831fd5f4505465adec
BLAKE2b-256 0c3ab6c2e7bd57c09251b96e33b62234467b54cc3308c8fb8eb9488c349f4773

See more details on using hashes here.

File details

Details for the file get_gecko_driver-1.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for get_gecko_driver-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02316287b9db13de1066cc70cc9607dff3700e2d0263c71bbd5de554da8c2dbd
MD5 4d8795def6a1d81c4ff59383735104dc
BLAKE2b-256 f4eea31608fe92c5c1ba1064a136a8da283c5de698ff7a32d90da8ebc77d8a17

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