小编Ash*_*h1x的帖子

'Webdrivers'可执行文件可能具有错误的权限.请参阅https://sites.google.com/a/chromium.org/chromedriver/home

我环顾四周检查了两份文件并找不到答案.

我一直在尝试使用InstaPy为python进行instagram api.失败后出现多个错误,并假设InstaPy只是遇到了一些问题,所以我尝试使用selinium对其进行原始编码.在插入示例代码并将其改为我喜欢之后,我确保这个代码能够正常工作.我收到了一个新错误而不是旧错误,说权限可能不对.我尝试重新安装并以管理员身份运行,但没有任何作用.我该如何解决这个和/或这是什么意思

码:

import time
from selenium import webdriver

driver = webdriver.Chrome('C:\Webdrivers')  # Optional argument, if not specified will search path.
driver.get('http://www.google.com/xhtml');
time.sleep(5) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5) # Let the user actually see something!
driver.quit()
Run Code Online (Sandbox Code Playgroud)

错误:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
    stdout=self.log_file, stderr=self.log_file)
  File "C:\Program Files (x86)\Python36-32\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Program Files (x86)\Python36-32\lib\subprocess.py", line 990, in _execute_child
    startupinfo) …
Run Code Online (Sandbox Code Playgroud)

python selenium google-chrome selenium-chromedriver selenium-webdriver

14
推荐指数
4
解决办法
3万
查看次数