美文网首页
Ubuntu配置selenium phantomjs

Ubuntu配置selenium phantomjs

作者: 王文强Python | 来源:发表于2024-02-20 16:17 被阅读0次

一、Ubuntu配置phantomjs

1、参考文档:
https://www.jianshu.com/p/fd76e68ce59b
https://cloud.tencent.com/developer/article/2183788
https://cloud.tencent.com/developer/article/2144989
2、下载安装
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

apt-get install bzip2 # 安装bzip2

tar -jxvf phantomjs-2.1.1-linux-x86_64.tar.bz2

mv phantomjs-2.1.1-linux-x86_64  /usr/local/src/phantomjs

ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs

apt-get install fontconfig freetype2
3、配置环境变量
vi  /etc/profile

#phantomjs
PHANTOMJS_HOME=/usr/local/src/phantomjs
export PATH=$PATH:$PHANTOMJS_HOME/bin

source /etc/profile

apt-get install libfontconfig
4、启动前执行命令
export OPENSSL_CONF=/etc/ssl/

相关文章

网友评论

      本文标题:Ubuntu配置selenium phantomjs

      本文链接:https://www.haomeiwen.com/subject/hibbadtx.html