2
Python / Selenium / PhantomJS:“无法使用ghostdriver启动phantomjs。”
我正在尝试让Selenium在Windows计算机上使用phantomjs。我的代码编译没有任何错误: from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import cookielib import re from splinter import Browser driver = webdriver.PhantomJS('C:/Program Files (x86)/phantomjs-1.9.2-windows') 但是我每次运行它都会收到错误消息 Traceback (most recent call last): File "E:/~PROJECT/disinfo/py/bs.py", line 8, in <module> driver = webdriver.PhantomJS('C:/Program Files (x86)/phantomjs-1.9.2-windows') File "C:\Python27\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py", line 50, in __init__ self.service.start() File "C:\Python27\lib\site-packages\selenium\webdriver\phantomjs\service.py", line 63, …
15
python