Skip to main content

Build chrome and chromedriver for use with selenium

Project description

HitchChrome

If you've ever had a problem with not having a chromedriver installed or your version of chromedriver not matching your installed version of chrome or some annoying obscure "browser fails to start with selenium" error that only starts happening randomly a day before you want to release because somebody ran a system upgrade, this is the package for you.

HitchChrome is a self contained package that will download and install its own isolated version of of Chrome and ChromeDriver that will work together and won't randomly break when somebody upgrades something.

HitchChrome is part of the hitchdev framework.

How?

First, build into a directory of your choice:

from hitchchrome import ChromeBuild

chrome_build = ChromeBuild("./chrome83", "83")
chrome_build.ensure_built()

Then use, either with GUI:

driver = chrome_build.webdriver()
driver.get("http://www.google.com")
driver.quit()

Or headless:

driver = chrome_build.webdriver(headless=True)
driver.get("http://www.google.com")
driver.quit()

Work to be done soon

  • Currently only works with Chromium stable version 83. Should work with multiple stable versions.
  • Only works with linux (should "just work" with mac soon).

Caveats

Requires aria2 to be installed (to download chrome + chromedriver). You need apt-get install aria2.

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

hitchchrome-0.2.1.tar.gz (7.5 kB view hashes)

Uploaded Source

Supported by

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