plantomjs最初是放在D:\\phantomjs\\bin\\phantomjs.exe 环境变量也添加了,各种尝试都是如下错误:
error:
selenium.common.exceptions.WebDriverException: Message: Unable to start phantomjs with ghostdriver.
Screenshot: available via screen
后来我放到C盘
#指定 phantomjs 驱动
path1='C:\\Python27\\phantomjs\\bin\\phantomjs.exe'
path2='C:\\Python27\\phantomjs\\bin\\phantomjs'
driver = webdriver.PhantomJS(executable_path=path1/path2)