4 글 보임 - 1 에서 4 까지 (총 4 중에서)
-
글쓴이글
-
2024년 3월 3일 02:03 #114907
김상원참가자제 chrome version은 122.0.6261.95에요. 근데 chrome driver download web에는 122.0.6261.94밖에 없더라구요. 그래서 이거라도 다운 받고 압축 풀기를 통해 chromedriver.exe, Lisence.chromedriver를 얻었어요. 이 두 파일을 파이썬 파일 디렉토리 내에 넣었어요. 그런데
raceback (most recent call last): File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\driver_finder.py", line 38, in get_path path = SeleniumManager().driver_location(options) if path is None else path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\selenium_manager.py", line 90, in driver_location output = self.run(args) ^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\selenium_manager.py", line 138, in run raise WebDriverException(f"Unsuccessful command executed: {command}.\n{result}{stderr}") selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser chrome --output json. {'code': 69, 'message': 'Driver unavailable: Driver path: ', 'driver_path': '', 'browser_path': ''}
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "c:\Users\user\Desktop\�ڵ�����\��ũ�Ѹ�\insta\app.py", line 6, in <module> driver = webdriver.Chrome() ^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__ super().__init__( File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in __init__ self.service.path = DriverFinder.get_path(self.service, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\driver_finder.py", line 41, in get_path raise NoSuchDriverException(msg) from err selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
이렇게 뜹니다.
뭐가 문제인가요..어떻게 해결하나요..
2024년 3월 3일 14:34 #114927
김상원참가자from selenium import webdriver from selenium.webdriver.common.keys import Keys import time
driver = webdriver.Chrome() driver.get("https://instagram.com")
#driver안에 주소에 담긴 글,이미지가 모두 담겨 있음.
time.sleep(2)
#맞게 입력하고 불렀는데 element가 없다고 뜨면, 페이지 로딩 시간 때문에 그럼. 페이지 로딩하는데 시간이 1~2초 걸리는데, 이때 데이터를 가져오려고 해서 에러 뜨는거 #위 문제에 경우, time.sleep()으로 delay를 걸면 로딩 시간 지연에 따른 문제가 해결.
e = driver.find_element_by_css_selector("input[name='username']") e.send_keys("내아이디") e.send_keys(Keys.ENTER)
time.sleep(100) 이미 그렇게 했는데 안 되는거라..! 어떻게 해야 될까요
-
글쓴이글
4 글 보임 - 1 에서 4 까지 (총 4 중에서)
- 답변은 로그인 후 가능합니다.