报错信息是 “DevTools listening on ws://127.0.0.1:56330/devtools/browser/7f4b459a-f6eb-4314-8ddc-a5e627e3457a
[1152:7936:1223/203758.618:ERROR:device_event_log_impl.cc(211)] [20:37:58.618] USB: usb_device_handle_win.cc:1020 Failed to read
descriptor from node connection: 连到系统上的设备没有发挥作用。 (0x1F) 3
[1152:7936:1223/203758.620:ERROR:device_event_log_impl.cc(211)] [20:37:58.620] Bluetooth: bluetooth_adapter_winrt.cc:1204 Gettin
g Radio failed. Chrome will be unable to change the power state by itself.
[1152:7936:1223/203758.634:ERROR:device_event_log_impl.cc(211)] [20:37:58.634] Bluetooth: bluetooth_adapter_winrt.cc:1297 OnPowe
redRadiosEnumerated(), Number of Powered Radios: 0”
出现了这个错误,但是这个错误不影响代码的执行.
出现场景是 scrapy 中使用了 selenium .
options = webdriver.ChromeOptions()
options.add_argument(’–log-level=3’)
options.add_experimental_option(‘excludeSwitches’, [‘enable-logging’])
self.driver = webdriver.Chrome(executable_path=‘C:/Users/delay/PycharmProjects/RequestsNewStudy/PlanceScrapy/wangyi/wangyi/chromedriver’,
options=options,service_log_path=os.devnull)
把 selenium的这个不记录在日志中即可