I want to run selenium in google colab i ran the following code:
!apt update
!apt install chromium-chromedriver
!pip install selenium
# 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')
# open it, go to a website, and get results
wd = webdriver.Chrome(options=options)
wd.get("https://www.whoscored.com")
print(wd.page_source) # results`
the result expected is the page source being printed out instead i get this error in my notebook:
WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1
Here is the link of the notebook:
https://colab.research.google.com/drive/13oUHGDc6uy-4vJ1XnRdEcojoFoIToV75
i tried changing the webdriver to firefox but i get a different error memory related stuff:
src/tcmalloc.cc:332] Attempt to free invalid pointer 0x24680020c5d0