#javascript #python #json #selenium #web-scraping
#javascript #python #json #selenium #очистка веб-страниц
Вопрос:
У меня здесь есть фрагмент моего кода,
options = Options()
options.add_extension("/Users/.../Desktop/proxy.zip")
options.headless = False
options.add_argument("--incognito")
driver = webdriver.Chrome('/Users/.../Downloads/chromedriver', options=options)
driver.get(url)
Всякий раз, когда я запускаю это, я получаю сообщение об ошибке:
Traceback (most recent call last):
File "/Users/.../Documents/code.py", line 95, in <module>
M_A()
File "/Users/.../Documents/code.py", line 32, in M_A
driver = webdriver.Chrome('/Users/.../Downloads/chromedriver', options=options)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
RemoteWebDriver.__init__(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: cannot process extension #1
from unknown error: cannot read manifest
И я понятия не имею, почему. Я просмотрел другие решения на этом сайте и в других местах, но они мне не помогли. Я действительно не знаю, почему мой файл manifest.json не может быть прочитан.
Комментарии:
1. всегда помещайте полное сообщение об ошибке (начинающееся со слова «Traceback») в вопрос (не комментарий) в виде текста (не скриншота). Есть и другая полезная информация.
2. @furas спасибо за предложение, я добавил все сообщение об ошибке