[python] Selenium error

Viewer

copyrawdownloadembedprintName: Selenium error
  1. from selenium import webdriver
  2. from selenium.webdriver.chrome.options import Options
  3. from selenium.webdriver.support.ui import WebDriverWait
  4. from selenium.webdriver.support import expected_conditions as EC
  5. from selenium.webdriver.common.by import By
  6. from fake_useragent import UserAgent
  7. from selenium.webdriver.firefox.options import Options as FirefoxOptions
  8.  
  9.  
  10. def connectFirefox():
  11.     options = FirefoxOptions()
  12.     #options.add_argument("--headless")
  13.     options.add_argument("--no-sandbox")
  14.     options.add_argument('--ignore-certificate-errors')
  15.     options.add_argument('--ignore-certificate-errors-spki-list')
  16.     options.add_argument('--ignore-ssl-errors')
  17.     options.add_argument("--disable-gpu")
  18.     driver = webdriver.Firefox(options=options)
  19.     print("Firefox Headless Browser Invoked")
  20.     return driver
  21.  
  22. driver = connectFirefox()
  23.  
  24. #driver = webdriver.Chrome(options=options, executable_path="./chromedriver")
  25. driver.get("https://www.aussar.es/cpu-am4-ryzen/amd-ryzen-5-5600x-box-37ghz.html")
  26.  
  27.  
  28. #name = driver.find_elements(By.CLASS_NAME, "h1 product-detail-name")
  29.  

Editor

You can edit this paste and save as new:


File Description
  • Selenium error
  • Paste Code
  • 05 May-2021
  • 1.08 Kb
You can Share it: