강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

joh3830님의 프로필 이미지
joh3830

작성한 질문수

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

2단계 - 나무태그 찾기

궁금해요

작성

·

384

0

from selenium import webdriver
import time

url = "https://search.naver.com/search.naver?where=image&sm=tab_jum&query=%EA%B0%95%EB%AF%BC%EA%B2%BD"
browser = webdriver.Chrome("C:/chromedriver.exe")
browser.implicitly_wait(10)
browser.maximize_window()
browser.get(url)
 
 
이걸 입력 후
 
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. 새로운 크로스 플랫폼 PowerShell 사용 https://aka.ms/pscore6 PS C:\crawliling> & C:/Users/조진오/AppData/Local/Programs/Python/Python38/python.exe c:/crawliling/chapter07/01.이미 지주소추출.py c:/crawliling/chapter07/01.이미지주소추출.py:13: DeprecationWarning: executable_path has been deprecated, please pass in a Service object browser = webdriver.Chrome("C:/chromedriver.exe") Traceback (most recent call last): File "C:\Users\조진오\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\조진오\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\조진오\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 지정된 파일을 찾을 수 없습니다 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:/crawliling/chapter07/01.이미지주소추출.py", line 13, in <module> browser = webdriver.Chrome("C:/chromedriver.exe") File "C:\Users\조진오\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__ super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog", File "C:\Users\조진오\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in __init__ self.service.start() File "C:\Users\조진오\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home PS C:\crawliling>
 
이렇게 뜨는데 무슨 뜻인가여.. 혹시나 해서 pip install
selenium 하고 했는데도 이렇게 뜹니다

답변 1

0

스타트코딩님의 프로필 이미지
스타트코딩
지식공유자

DeprecationWarning

Deprecated : "사용이 권장되지 않는" 이라는 뜻입니다.

앞으로 개발 할 때 종종 보게될 메시지 인데요.

 

오류가 아니라,

새로운 방식으로 업데이트 되었으니 예전 방식을 그만 써줘라고 권장하는 겁니다.

 

셀레니움 4버전으로 업데이트 되면서

새로운 방식으로 드라이버를 설치하고 사용하는 것을 권장하고 있습니다.

 

해당 내용은 

강의소개 - (BONUS) 셀레니움 4 가이드 강의에서 다뤄 드리고 있으니 참고 부탁드립니다 ^^ 

 

 

 

joh3830님의 프로필 이미지
joh3830

작성한 질문수

질문하기