0

Getting the following error, and I added the following line of code (--ignore-certificate-errors), note sure what I did wrong.

The error:

DevTools listening on ws://127.0.0.1:56244/devtools/browser/1a699b0c-d431-43c3-aa5f-ab64031973df
[44308:16780:0813/155449.465:ERROR:cert_issuer_source_aia.cc(34)] Error parsing cert retrieved from AIA (as DER):
ERROR: Couldn't read tbsCertificate as SEQUENCE
ERROR: Failed parsing Certificate

Selenium Issue : ERROR: Couldn't read tbsCertificate

Code:

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options
import time

start_url = 'https://www.iseecars.com/used-cars/used-tesla-for-sale#Location=66952' + \
        '&Radius=all&Make=Tesla&Model=Model+3&Condition=used&_t=a&maxResults=15' + \
        '&sort=BestDeal&sortOrder=desc&lfc_t0=MTU2Nzk2NzkzNDc2NQ%3D%3D'


with webdriver.Chrome() as driver:
wait = WebDriverWait(driver, 10)

driver.get(start_url)
time.sleep(1)
chrome_options = Options()
chrome_options.add_argument('--allow-running-insecure-content')
chrome_options.add_argument("--ignore-certificate-errors")
teslas = driver.find_element('div#cars_v2-result-list')
model = teslas.find_element('h3')

print(model.text)
Shawn
  • 4,064
  • 2
  • 11
  • 23
Stacey
  • 63
  • 8
  • Does this answer your question? [How do I resolve this error in Selenium : ERROR: Couldn't read tbsCertificate as SEQUENCE, ERROR: Failed parsing Certificate](https://stackoverflow.com/questions/75160044/how-do-i-resolve-this-error-in-selenium-error-couldnt-read-tbscertificate-as) – Yaroslavm Aug 14 '23 at 08:27

1 Answers1

2

Add below line to ignore this ERROR:

chrome_options.add_experimental_option('excludeSwitches', ['enable-logging'])

https://stackoverflow.com/a/75695484/7598774

https://stackoverflow.com/a/75721330/7598774

Shawn
  • 4,064
  • 2
  • 11
  • 23