Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zaironjacobs/get-gecko-driver
A tool to download and install GeckoDriver.
https://github.com/zaironjacobs/get-gecko-driver
firefox geckodriver python webdriver
Last synced: 3 months ago
JSON representation
A tool to download and install GeckoDriver.
- Host: GitHub
- URL: https://github.com/zaironjacobs/get-gecko-driver
- Owner: zaironjacobs
- License: mit
- Created: 2020-12-16T15:48:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-22T09:38:38.000Z (over 1 year ago)
- Last Synced: 2024-07-09T20:13:20.327Z (4 months ago)
- Topics: firefox, geckodriver, python, webdriver
- Language: Python
- Homepage:
- Size: 58.6 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Get GeckoDriver
=================
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/get-gecko-driver?color=blue)](https://pypi.python.org/pypi/get-gecko-driver)
[![PyPI](https://img.shields.io/pypi/v/get-gecko-driver?color=blue)](https://pypi.python.org/pypi/get-gecko-driver)
[![PyPI - Status](https://img.shields.io/pypi/status/get-gecko-driver)](https://pypi.python.org/pypi/get-gecko-driver)
[![PyPI - License](https://img.shields.io/pypi/l/get-gecko-driver)](https://pypi.python.org/pypi/get-gecko-driver)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.This Python package runs through a Jenkins test pipeline every hour to ensure proper functionality.
## Install
To install:
```console
pip install get-gecko-driver
```To upgrade:
```console
pip install get-gecko-driver --upgrade
```## Usage
#### Install and use GeckoDriver with Selenium
```Python
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
```Python
from get_gecko_driver import GetGeckoDriverget_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:
```console
get-gecko-driver --latest-urls
```Print the latest version:
```console
get-gecko-driver --latest-version
```Print the latest version url:
```console
get-gecko-driver --latest-url
```Download the latest version and extract the file:
```console
get-gecko-driver --download-latest --extract
```Download a specific version and extract the file:
```console
get-gecko-driver --download-version 0.27.0 --extract
```#### The downloaded driver can be found at:
*`////`*
### 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.
--version App version.
```