python进行爬虫处理时,运用 seleniumwebdriver.PhantomJS 时一直报错,说是意外退出,状态码为1,

# 测试代码
# 自动按照环境变量查找相应的浏览器
driver = webdriver.PhantomJS()
Service phantomjs unexpectedly exited. Status code was: 1

  后来参考相关文章 在括号中添加相关路径 即可运行,究其原因drive默认为自动寻找,但是由于一些原因又找不大所以就报错了。

driver = webdriver.PhantomJS("F:\Desktop\phantomjs-2.1.1-windows\\bin\phantomjs.exe")

  PhantomJS下载网址:https://phantomjs.org/download.html


  同样的类似错误 chromedrive 显示 Status code was: 1 的处理方式也是一样。

# 错误信息
selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1
# 可能需要手动添加路径
driver = webdriver.Chrome("F:\Desktop\chromedriver_win32\chromedriver.exe")

  chromedriver下载网址:http://chromedriver.storage.googleapis.com/index.html


参考文章:【1】Python脚本报错:selenium.common.exceptions.WebDriverException: Message: Service chromedriver.exe unexpect
     【2】ChromeDriver的下载

Service phantomjs unexpectedly exited. Status code was: 1相关推荐

  1. 解决Service webdriver unexpectedly exited问题

    解决Service webdriver unexpectedly exited问题 在使用airtest自动化脚本录制时遇到报错 解决: 1.下载chromedriver,地址:http://chro ...

  2. com.amazonaws.services.s3.model.AmazonS3Exception: null (Service: Amazon S3; Status Code: 403;

    开发项目配置完移动云测试图片上传时,报错,如图所示: 具体报错信息: Exception in thread "main" com.amazonaws.services.s3.mo ...

  3. etcd.service: main process exited, code=exited, status=203/EXEC

    部署ETCD异常解决 # 查看日志 [root@m2 pki]# journalctl -xe-- Subject: Unit etcd.service has failed -- Defined-B ...

  4. systemd-timesyncd.service 失败 (code=exited, status=127)

    service启动失败 systemctl status systemd-timesyncd.service Start request repeated too quickly 这个错误一般是ser ...

  5. linux fsck exited with status code 4,linux – 在硬盘崩溃后启动PostgreSQL服务器导致FAILED STATE...

    我正在使用Fedora 15和PostgreSQL 9.1.4. Fedora最近崩溃了,之后: 尝试启动PostgreSQL服务器: service postgresql-9.1 start 给 S ...

  6. Gitea 无法启动提示 (code=exited, status=203/exec) 错误

    完整的提示信息为: ● gitea.service - Gitea (Git with a cup of tea) Loaded: loaded (/etc/systemd/system/gitea. ...

  7. jenkins 报错 code=exited, status=127

    查看 jenkins 服务状态 时报错 sudo systemctl status jenkins 报错信息 ● jenkins.service - LSB: Jenkins Automation S ...

  8. k8s kubelet 服务无法启动报 code=exited, status=1/FAILURE错误

    最近由于本地服务器重启,而 kubelet 服务无法启动,显示如下错误 [root@k8s-m ~]# /bin/systemctl status kubelet.service ● kubelet. ...

  9. 求助:vsftpd启动报错code=exited, status=2

    vsftpd版本:vsftpd-3.0.2-22.el7.x86_64 centos7:CentOS Linux release 7.4.1708 (Core) vsftpd配置文件如下: anony ...

  10. ExecStart=/usr/bin/dockerd (code=exited, status=1/FAILURE)

    镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 问题:搭建私库认证不通过x509: certificate signed by unknown authority 首先确保配置harbor私库地 ...

最新文章

  1. 如何查看linux函数对应的库文件
  2. CreateDirectory GetCurrentDirectory 和SetCurrentDirectory
  3. 2019年如何打造自己的“前端品牌”
  4. Spring Security + Session Redis——JSON序列化错误[The class xxx and name of xxx is not whitelisted. ]解决方案
  5. j.u.c系列(11)---之并发工具类:Exchanger
  6. jquery 与其他库冲突解决方案
  7. 手机长曝光怎么设置_摄影教程丨手机如何拍摄长曝光照片,流光快门,星空银河搞起来!...
  8. 在Oracle中添加用户登录名称
  9. RHEL5.6更新yum源
  10. 烽火路由路虚拟服务器,netcore路由设置烽火
  11. iOS中 断点下载详解 韩俊强的博客
  12. 安装Office 2016出现 Office 16 Click-to-Run Extensibility Component
  13. 超详细图文保姆级教程:App开发新手入门(六)
  14. 继承者的难题:李在镕能否接班三星?
  15. opencvjs 磨皮美颜
  16. BHQ-2胺是一种暗猝灭剂,BHQ-2 amine,1241962-11-7可与目标底物或含有羧酸盐部分的生物分子结合
  17. dashboard的安装使用
  18. BLE Peripheral设备的名字显示错误
  19. 安居客冲刺上市:姚劲波全力支持,距离贝壳找房还差6个我爱我家
  20. unicode exp学习

热门文章

  1. 云服务器win10系统初始密码,win10进入安全模式需要密码初始密码是什么
  2. EXCEL MATCH函数
  3. vue播放flv视频流
  4. Logistic 回归的决策边界
  5. 内存分配 与 const
  6. 经验分享帖 汇承HC-12无线模块的简单使用说明
  7. “绝美画卷”网站欣赏
  8. 一张纸厚度是多少毫米_一本书的厚度大约是多少,一张纸的厚度大约是十分之一毫米,一本书...
  9. android 集成 firebase 推送
  10. 解决视频导入pr中只显示音频