使用webdriver.PhantomJS()出错

clipboard.png
请问各位大神,这是什么情况???

阅读 5.3k
3 个回答

重启下电脑试试。

详见http://stackoverflow.com/questions/36153...
Solved by changing function in selenium.webdriver.phantomjs.service.py like follow:

was

def send_remote_shutdown_command(self):
    if self._cookie_temp_file:
            os.remove(self._cookie_temp_file)

after adding try/except construction:

def send_remote_shutdown_command(self):
    try:
        if self._cookie_temp_file:
            os.remove(self._cookie_temp_file)
    except PermissionError:
        pass
新手上路,请多包涵

大哥你是没有安装phantomjs 浏览器。可以在http://phantomjs.org直接下载,解压就可以用了。之后将路径配置下 driver = webdriver.PhantomJS(executable_path=r"E:phantomjs-2.1.1-windowsbinphantomjs.exe")

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题