Last active
June 6, 2018 22:05
-
-
Save fcschmidt/1366251a604c566220680d2ea098d43a to your computer and use it in GitHub Desktop.
Chrome binary not detected - Solution used! Discussion: https://github.com/heroku/heroku-buildpack-google-chrome/issues/26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHROMEDRIVER_PATH = "/app/.chromedriver/bin/chromedriver" | |
chrome_bin = os.environ.get('GOOGLE_CHROME_BIN', "chromedriver") | |
options = webdriver.ChromeOptions() | |
options.binary_location = chrome_bin | |
options.add_argument("--disable-gpu") | |
options.add_argument("--no-sandbox") | |
options.add_argument('headless') | |
options.add_argument('window-size=1200x600') | |
driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run (headless) Google Chrome on Heroku:
https://github.com/heroku/heroku-buildpack-google-chrome
Installs chromedriver in a Heroku slug:
https://github.com/heroku/heroku-buildpack-chromedriver