小编Ama*_*nus的帖子

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')
Run Code Online (Sandbox Code Playgroud)

但是每次我运行它我都会收到错误

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, in start
    raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
selenium.common.exceptions.WebDriverException: Message: 'Unable to start phantomjs with ghostdriver.' ; Screenshot: available via screen 
Run Code Online (Sandbox Code Playgroud)

我已经收到这个错误几个小时了。“无法使用 ghostdriver …

python

15
推荐指数
1
解决办法
2万
查看次数

Git:列出另一个分支中不在当前分支中的所有文件?

git diff <other branch> <this branch> 
Run Code Online (Sandbox Code Playgroud)

将显示所有差异,但当前分支中不存在的文件在该列表中没有特殊指示符。

git

6
推荐指数
2
解决办法
7002
查看次数

标签 统计

git ×1

python ×1