Я скачал chromedriver, и я его вставил в код , но мне при запуске выдает ошибку. В чем проблема?
Сам код:
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.service import Service
s = Service(executable_path="C:\Python Scripts\SCOPE GG\chromedriver_win32")
option = webdriver.ChromeOptions()
option.add_argument('user-agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 RuxitSynthetic/1.0 v4855491048643708510 t1191530496833852085')
option.add_argument('--disable-blink-features=AutomationControlled')
# option.add_argument('--headless')
driver = webdriver.Chrome(options=option, service=s)
# sleep(100)
# pickle.dump(driver.get_cookies(), open('buff_session', 'wb'))
# print('Куки сохранены')
driver.get('https://www.twitch.tv/')
sleep(100)
Ошибка:
File "C:\Python Scripts\SCOPE GG\main.py", line 33, in <module>
driver = webdriver.Chrome(options=option, service=s)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
selenium.common.exceptions.NoSuchDriverException: Message: Unable to locate or obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location