I have created a script to scrape some elements from a website.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
url = "https://..."
ser = Service(r"C:\...")
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-gpu")
driver = webdriver.Chrome(service = ser, options=chrome_options)
driver.get(url)
unseen = driver.find_elements(By.XPATH,"//div[@class='vpRowHoriz flagUnseen vpRow DragElt']")
print(selen_ungelesen[0].text)
....
It works perfectly fine, as long as the --headless argument is not given. There are several suggestions on stackflow how to address this problem (change language by --lan, change window size, add a fakeuser, ...). None of them work for my script and it seemed to be a known problem. stackoverflow
Since the options "no-sandbox" ,"--headless", "--disable-gpu") are mandatory in pythonanywhere, I would like to try another webdriver. Firefox/Geckodriver seems to do the job regardless the --headless. Since on your selenium help page you only mention chromedriver I'd like to know if other webdrivers possible?