1.安装selenium
pip install selenium Collecting selenium Downloading selenium-3.4.1-py2.py3-none-any.whl (931kB) 100% |████████████████████████████████| 942kB 573kB/s Installing collected packages: selenium Successfully installed selenium-3.4.1
2.安装phantomjs
下载地址:http://phantomjs.org/download.html
下载的版本是:phantomjs-2.1.1-linux-x86_64.tar.bz2
解压下载好的文件,并把文件夹移动到/usr/local目录下
sudo mv phantomjs-2.1.1-linux-x86_64 /usr/local/phantomjs
在/etc/profile下添加,之后source /etc/profile
export PHANTOMJS_HOME=/usr/local/phantomjs export PATH=$PATH:$PHANTOMJS_HOME/bin
测试是否安装成功
phantomjs -v 2.1.1
时间: 2024-10-20 18:14:30