iT邦幫忙

0

python Chrome正在受到自動軟體的控制

  • 分享至 

  • xImage

https://ithelp.ithome.com.tw/upload/images/20210427/201197421IUmBmrt3M.png

我找到下面文章 , 但還是無法解決
https://kknews.cc/zh-tw/code/3bqpyyy.html

from selenium import webdriver
optons=webdriver.ChromeOptions()
optons.add_argument('disable-infobars')
driver=webdriver.Chrome(chrome_options=optons)
driver.maximize_window()
driver.get
driver = webdriver.Chrome("D:\python\chromedriver.exe")
drvier.get("http://www.google.com")
dlement=driver.find_element_by_class_name("gLFyf.gsfi")
element.send_keys("Selenium Python")
D:\python>[11632:12292:0427/225437.236:ERROR:device_event_log_impl.cc(214)] [22:54:37.236] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: 連結到系統的某個裝置失去作用。 (0x1F)
[11632:12292:0427/225437.296:ERROR:device_event_log_impl.cc(214)] [22:54:37.297] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: 連結到系統的某個裝置失去作用。 (0x1F)
[11632:12292:0427/225437.299:ERROR:device_event_log_impl.cc(214)] [22:54:37.299] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: 連結到系統的某個裝置失去作用。 (0x1F)
[16120:9008:0427/225631.057:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is disabled
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
微甜的酸
iT邦新手 2 級 ‧ 2021-04-28 00:03:22
from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_experimental_option("prefs", {"profile.password_manager_enabled": False, "credentials_enable_service": False})

driver=webdriver.Chrome(chrome_options=options)
driver.maximize_window()

driver.get("http://www.google.com")
kevin543 iT邦新手 5 級 ‧ 2021-04-28 09:25:39 檢舉

謝謝回答 , 怎麼沒有出現輸入 Selenium Python

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_experimental_option("prefs", {"profile.password_manager_enabled": False, "credentials_enable_service": False})

driver=webdriver.Chrome(chrome_options=options)
driver.maximize_window()

driver.get("http://www.google.com")
dlement=driver.find_element_by_class_name("gLFyf.gsfi")
element.send_keys("Selenium Python")

https://ithelp.ithome.com.tw/upload/images/20210428/201197428rdCSXSuYw.png

因為你的路徑跟我不一樣

我要發表回答

立即登入回答