Web scrapping with selenium works fine on my mac local machine but when I push to live Ubuntu server, I get the following error
Could not get version for Chrome with this command: google-chrome --version || google-chrome-stable --version
when I try to run
from webdriver_manager.chrome import ChromeDriverManager
chrome_options = Options()
chrome_options.add_argument("--headless")
driver = webdriver.Chrome(ChromeDriverManager().install(), options=chrome_options)
The code is deployed on AWS ec2 instance
CodePudding user response:
try it like this
options = webdriver.ChromeOptions()
here's another hint for you http://chromedriver.chromium.org/capabilities
CodePudding user response:
If you are using Chromium, try installing Google Chrome instead of using chromium. As far as I know selenium is designed for Chrome. There is another related topic here: Making program using Chromedriver, getting error: "Could not get version for Chrome with this command"