목차
[Python]Selenium BluetoothAvailability() 문제 현상
코드>>
from selenium import webdriver
driver = webdriver.Chrome()
driver.maximize_window()
driver.get('http://www.g2b.go.kr/index.jsp')
위 코드를 구현 하였고 아래와 같이 에러 메세지가 발생하였습니다.
에러메세지>>
[3740:8148:0124/084133.199:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[3740:8148:0124/084133.200:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[3740:8148:0124/084133.200:ERROR:chrome_browser_main_extra_parts_metrics.cc(235)] START: GetDefaultBrowser(). If you don't see the END: message, this is crbug.com/1216328.
[3740:16792:0124/084133.206:ERROR:device_event_log_impl.cc(214)] [08:41:33.206] USB: usb_device_handle_win.cc:1050 Failed to read descriptor from node connection: 시스템에 부착된 장치가 작동하지 않습니다. (0x1F)
[3740:16792:0124/084133.208:ERROR:device_event_log_impl.cc(214)] [08:41:33.208] USB: usb_device_handle_win.cc:1050 Failed to read descriptor from node connection: 시스템에 부착된 장치가 작동하지 않습니다. (0x1F)
[3740:16792:0124/084133.208:ERROR:device_event_log_impl.cc(214)] [08:41:33.208] USB: usb_device_handle_win.cc:1050 Failed to read descriptor from node connection: 시스템에 부착된 장치가 작동하지 않습니다. (0x1F)
[3740:8148:0124/084133.226:ERROR:chrome_browser_main_extra_parts_metrics.cc(239)] END: GetDefaultBrowser()
[Python]Selenium BluetoothAvailability() 해결 방법
해당 에러 메세지는 블루투스 관련 연결에 대한 에러 메세지로 셀레니움을 사용해서 웹 크롤링(Web Crawling)과는 관련이 없습니다.
사실 에러 메세지가 나와도 사용에는 문제가 없지만 에러 메세지를 삭제하고 싶다면 아래와 같이 입력 하시면 됩니다.
수정 코드>>
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
driver.maximize_window()
driver.get('http://www.g2b.go.kr/index.jsp')
2~3번 라인: option을 사용해서 외부 스위치를 exclude 합니다.
4번 라인:option이 포함된 drive를 실행합니다.
'파이썬(Python) > 웹스크롤링' 카테고리의 다른 글
[Python] RE 모듈로 미세먼지 데이터 필터링하기(정규표현, 특수문자) (0) | 2022.05.30 |
---|---|
[Python] 공공데이터포털에서 미세먼지 데이터 가져오기(크롤링, fine dust, API, 파이썬) (0) | 2022.05.24 |
[Python] 네이버 금융 주식 정보 가져오기 (ex. 삼성전자) (0) | 2021.11.09 |
[Python] yfinance로 고점대비 하락율 그래프 그리기 (코스피, 코스닥, MDD) (0) | 2021.11.08 |
[Python] yfinance 함수 사용법 정리 (코스피,테슬라) (0) | 2021.11.02 |