Anyone working with Selenium in Google Colab has had trouble since yesterday, before 16hrs (UTC)
The code sample below was working all day long, but after lunchtime, it began to crash.
SessionNotCreatedException: Message: session not created: Chrome instance exited,
when driver = webdriver.Chrome(options=chrome_options), before that time, everything was working sweet. The driver verbose log doesn't contain anything
thx is advance
code sample
#without output adapted to kaggle
# =========================================
# STEP 1 — INSTALL DEPENDENCIES
# =========================================
!apt-get update -qq
!apt-get install -qq chromium-chromedriver
!pip install -q selenium tabulate ipywidgets pillow pandas requests openpyxl
# =========================================
# STEP 2 — IMPORTS
# =========================================
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait, Select
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import StaleElementReferenceException, TimeoutException
from google.colab import files
from IPython.display import display, clear_output
import ipywidgets as widgets
import pandas as pd
import requests, time
from datetime import datetime
import re
from os.path import join
import time
import IPython
import os
# =========================================
# STEP 3 — DRIVER CONFIGURATION
# =========================================
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--window-size=1920,1080")
driver = webdriver.Chrome(options=chrome_options)
wait = WebDriverWait(driver, 15)
url = "https://opcoes.net.br/opcoes/bovespa/AMBP3"
driver.get(url)
time.sleep(2)