Source https://stackoverflow.com/a/53590694 + minor updates
# install chromium, its driver, and selenium
apt-get update
apt install chromium-chromedriver
pip install selenium
Last active
December 18, 2019 19:08
-
-
Save xanderim/335f8c0926bf64b8cee552b0ad9dd560 to your computer and use it in GitHub Desktop.
Install Chromium, chromedriver and Selenium (Python) on Ubuntu
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
# set options to be headless, .. | |
from selenium import webdriver | |
options = webdriver.ChromeOptions() | |
options.add_argument('--headless') | |
options.add_argument('--no-sandbox') | |
options.add_argument('--disable-dev-shm-usage') | |
# in case you have chrome and chromium installed you should specify briwser binary path | |
options.binary_location = '/usr/bin/chromium-browser' | |
# open it, go to a website, and get results | |
wd = webdriver.Chrome('chromedriver', chrome_options=options) | |
wd.get("https://www.website.com") | |
print(wd.page_source) # results-get update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment