webdriverdownloader


Namewebdriverdownloader JSON
Version 1.1.0.4 PyPI version JSON
download
home_pagehttps://github.com/leonidessaguisagjr/webdriverdownloader
SummaryPython module and CLI tool for facilitating download and deploy of WebDriver binaries.
upload_time2024-01-31 09:14:40
maintainer
docs_urlNone
authorLeonides T. Saguisag Jr.
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ``webdriverdownloader``
=======================

Python module to facilitate downloading and deploying `WebDriver <https://www.w3.org/TR/webdriver/>`_
binaries.  The classes in this module can be used to automatically search for
and download the latest version (or a specific version) of a WebDriver binary
(will download to ``$HOME/webdriver`` or ``/usr/local/webdriver`` if run with
``sudo``), extract the binary from the downloaded archive and create a symlink
in either ``/usr/local/bin`` (if run with ``sudo``) or ``$HOME/bin``.

Note: For non-root users, the ``$HOME/bin`` directory may not be in the search
PATH.  If you are unable to add this directory your search path, a workaround
is to capture the return value from the ``download()`` or ``download_and_install()``
method (see the docstrings for those methods for more information on the return
values) and pass the path to the downloaded webdriver binary as a parameter to
the constructor for the Selenium WebDriver instance.  See the documentation for
the ``executable_path`` parameter for the relevant WebDriver class for more
information.


Installation
------------

This module is available on the Python Package Index (PyPI) and can be
installed as follows:

``pip install webdriverdownloader``


Dependencies
------------

This module is dependent on the following additional packages:

- `beautifulsoup4 <https://pypi.org/project/beautifulsoup4/>`_
- `requests <https://pypi.org/project/requests/>`_
- `tqdm <https://pypi.org/project/tqdm/>`_


Classes
-------

The following classes are available:

- ``ChromeDriverDownloader`` for downloading and installing `chromedriver <https://sites.google.com/a/chromium.org/chromedriver/downloads>`_ (for Google Chrome).
- ``GeckoDriverDownloader`` for downloading and installing `geckodriver <https://github.com/mozilla/geckodriver>`_ (for Mozilla Firefox).
- ``OperaChromiumDriverDownloader`` for downloading and installing `operadriver <https://github.com/operasoftware/operachromiumdriver>`_ (for Chromium based Opera browsers).


Status
------

Currently being developed/tested using Python 2.7.16 and 3.8.1 on macOS and
Windows 10.


Example module usage
--------------------

Example::

   >>> from webdriverdownloader import GeckoDriverDownloader
   >>> gdd = GeckoDriverDownloader()
   >>> gdd.download_and_install()
   1524kb [00:00, 1631.24kb/s]
   ('/Users/lsaguisag/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')
   >>> gdd.download_and_install("v0.20.0")
   1501kb [00:02, 678.92kb/s]
   Symlink /Users/lsaguisag/bin/geckodriver already exists and will be overwritten.
   ('/Users/lsaguisag/webdriver/geckodriver-v0.20.0-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')
   >>> gdd.download_and_install()
   Symlink /Users/lsaguisag/bin/geckodriver already exists and will be overwritten.
   ('/Users/lsaguisag/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')
   >>>


Command line tool
-----------------

There is a command-line tool that is also available.  After installing the
package, it can be used as follows (Windows example)::

   > webdriverdownloader chrome:2.38 firefox opera:v.2.35
   Downloading WebDriver for browser: 'chrome'
   3300kb [00:00, 11216.38kb/s]
   Driver binary downloaded to: C:\Users\lsaguisag\webdriver\chrome\2.38\2.38%2Fchromedriver_win32\chromedriver.exe
   Driver copied to: C:\Users\lsaguisag\bin\chromedriver.exe

   Downloading WebDriver for browser: 'firefox'
   3031kb [00:01, 2253.64kb/s]
   Driver binary downloaded to: C:\Users\lsaguisag\webdriver\gecko\v0.20.1\geckodriver-v0.20.1-win64\geckodriver.exe
   Driver copied to: C:\Users\lsaguisag\bin\geckodriver.exe

   Downloading WebDriver for browser: 'opera'
   3548kb [00:02, 1239.02kb/s]
   Driver binary downloaded to: C:\Users\lsaguisag\webdriver\operachromium\v.2.35\operadriver_win64\operadriver_win64\operadriver.exe
   Driver copied to: C:\Users\lsaguisag\bin\operadriver.exe

   WARNING: Path 'C:\Users\lsaguisag\bin' is not in the PATH environment variable.

In the above example, a version was specified for Chrome and Opera while no
version was specified for Firefox so the latest version of ``geckodriver`` was
implicitly downloaded.


TODOs
-----

- Test on Linux


License
-------

This is released under an MIT license.  See the ``LICENSE`` file in this
repository for more information.

Important: Consult the license terms of the providers of the WebDriver
downloads prior to downloading / using the WebDrivers.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/leonidessaguisagjr/webdriverdownloader",
    "name": "webdriverdownloader",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Leonides T. Saguisag Jr.",
    "author_email": "leonidessaguisagjr@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/91/5a/a6f81e9b2bd9f03d8e81af561997d46e97511758dfad1db63b6ad68db7f2/webdriverdownloader-1.1.0.4.tar.gz",
    "platform": null,
    "description": "``webdriverdownloader``\n=======================\n\nPython module to facilitate downloading and deploying `WebDriver <https://www.w3.org/TR/webdriver/>`_\nbinaries.  The classes in this module can be used to automatically search for\nand download the latest version (or a specific version) of a WebDriver binary\n(will download to ``$HOME/webdriver`` or ``/usr/local/webdriver`` if run with\n``sudo``), extract the binary from the downloaded archive and create a symlink\nin either ``/usr/local/bin`` (if run with ``sudo``) or ``$HOME/bin``.\n\nNote: For non-root users, the ``$HOME/bin`` directory may not be in the search\nPATH.  If you are unable to add this directory your search path, a workaround\nis to capture the return value from the ``download()`` or ``download_and_install()``\nmethod (see the docstrings for those methods for more information on the return\nvalues) and pass the path to the downloaded webdriver binary as a parameter to\nthe constructor for the Selenium WebDriver instance.  See the documentation for\nthe ``executable_path`` parameter for the relevant WebDriver class for more\ninformation.\n\n\nInstallation\n------------\n\nThis module is available on the Python Package Index (PyPI) and can be\ninstalled as follows:\n\n``pip install webdriverdownloader``\n\n\nDependencies\n------------\n\nThis module is dependent on the following additional packages:\n\n- `beautifulsoup4 <https://pypi.org/project/beautifulsoup4/>`_\n- `requests <https://pypi.org/project/requests/>`_\n- `tqdm <https://pypi.org/project/tqdm/>`_\n\n\nClasses\n-------\n\nThe following classes are available:\n\n- ``ChromeDriverDownloader`` for downloading and installing `chromedriver <https://sites.google.com/a/chromium.org/chromedriver/downloads>`_ (for Google Chrome).\n- ``GeckoDriverDownloader`` for downloading and installing `geckodriver <https://github.com/mozilla/geckodriver>`_ (for Mozilla Firefox).\n- ``OperaChromiumDriverDownloader`` for downloading and installing `operadriver <https://github.com/operasoftware/operachromiumdriver>`_ (for Chromium based Opera browsers).\n\n\nStatus\n------\n\nCurrently being developed/tested using Python 2.7.16 and 3.8.1 on macOS and\nWindows 10.\n\n\nExample module usage\n--------------------\n\nExample::\n\n   >>> from webdriverdownloader import GeckoDriverDownloader\n   >>> gdd = GeckoDriverDownloader()\n   >>> gdd.download_and_install()\n   1524kb [00:00, 1631.24kb/s]\n   ('/Users/lsaguisag/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')\n   >>> gdd.download_and_install(\"v0.20.0\")\n   1501kb [00:02, 678.92kb/s]\n   Symlink /Users/lsaguisag/bin/geckodriver already exists and will be overwritten.\n   ('/Users/lsaguisag/webdriver/geckodriver-v0.20.0-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')\n   >>> gdd.download_and_install()\n   Symlink /Users/lsaguisag/bin/geckodriver already exists and will be overwritten.\n   ('/Users/lsaguisag/webdriver/geckodriver-v0.20.1-macos/geckodriver', '/Users/lsaguisag/bin/geckodriver')\n   >>>\n\n\nCommand line tool\n-----------------\n\nThere is a command-line tool that is also available.  After installing the\npackage, it can be used as follows (Windows example)::\n\n   > webdriverdownloader chrome:2.38 firefox opera:v.2.35\n   Downloading WebDriver for browser: 'chrome'\n   3300kb [00:00, 11216.38kb/s]\n   Driver binary downloaded to: C:\\Users\\lsaguisag\\webdriver\\chrome\\2.38\\2.38%2Fchromedriver_win32\\chromedriver.exe\n   Driver copied to: C:\\Users\\lsaguisag\\bin\\chromedriver.exe\n\n   Downloading WebDriver for browser: 'firefox'\n   3031kb [00:01, 2253.64kb/s]\n   Driver binary downloaded to: C:\\Users\\lsaguisag\\webdriver\\gecko\\v0.20.1\\geckodriver-v0.20.1-win64\\geckodriver.exe\n   Driver copied to: C:\\Users\\lsaguisag\\bin\\geckodriver.exe\n\n   Downloading WebDriver for browser: 'opera'\n   3548kb [00:02, 1239.02kb/s]\n   Driver binary downloaded to: C:\\Users\\lsaguisag\\webdriver\\operachromium\\v.2.35\\operadriver_win64\\operadriver_win64\\operadriver.exe\n   Driver copied to: C:\\Users\\lsaguisag\\bin\\operadriver.exe\n\n   WARNING: Path 'C:\\Users\\lsaguisag\\bin' is not in the PATH environment variable.\n\nIn the above example, a version was specified for Chrome and Opera while no\nversion was specified for Firefox so the latest version of ``geckodriver`` was\nimplicitly downloaded.\n\n\nTODOs\n-----\n\n- Test on Linux\n\n\nLicense\n-------\n\nThis is released under an MIT license.  See the ``LICENSE`` file in this\nrepository for more information.\n\nImportant: Consult the license terms of the providers of the WebDriver\ndownloads prior to downloading / using the WebDrivers.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python module and CLI tool for facilitating download and deploy of WebDriver binaries.",
    "version": "1.1.0.4",
    "project_urls": {
        "Homepage": "https://github.com/leonidessaguisagjr/webdriverdownloader"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0ffcbb7aac720a6a6bf67bf1f69e315fada7ae158ea9ed9af3712d15fc4061e",
                "md5": "877664526743cf4a3c27ced84b57284b",
                "sha256": "029eb319dcac0f0dc36625ef84b81213b14a4182565374b5163d5e262effa17c"
            },
            "downloads": -1,
            "filename": "webdriverdownloader-1.1.0.4-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "877664526743cf4a3c27ced84b57284b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 10488,
            "upload_time": "2024-01-31T09:14:38",
            "upload_time_iso_8601": "2024-01-31T09:14:38.145370Z",
            "url": "https://files.pythonhosted.org/packages/b0/ff/cbb7aac720a6a6bf67bf1f69e315fada7ae158ea9ed9af3712d15fc4061e/webdriverdownloader-1.1.0.4-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "915aa6f81e9b2bd9f03d8e81af561997d46e97511758dfad1db63b6ad68db7f2",
                "md5": "b8fe1dd23f8cf2d972de667b289f309d",
                "sha256": "ecbce10d65b905facbc238116fc17371c266528fba940cc94830d29eb136831b"
            },
            "downloads": -1,
            "filename": "webdriverdownloader-1.1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b8fe1dd23f8cf2d972de667b289f309d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10483,
            "upload_time": "2024-01-31T09:14:40",
            "upload_time_iso_8601": "2024-01-31T09:14:40.030671Z",
            "url": "https://files.pythonhosted.org/packages/91/5a/a6f81e9b2bd9f03d8e81af561997d46e97511758dfad1db63b6ad68db7f2/webdriverdownloader-1.1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-31 09:14:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "leonidessaguisagjr",
    "github_project": "webdriverdownloader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "webdriverdownloader"
}
        
Elapsed time: 0.17950s