1. 安装selenium

pip install selenium

2. 安装phantomjs

如果你是Ubuntu12.04,默认安装的版本是1.4.这个会出错。

需要安装1.9.7

cd /usr/local/share
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs

 

相关文章:

  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2021-06-18
  • 2021-11-18
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
猜你喜欢
  • 2021-06-12
  • 2021-08-15
  • 2022-01-05
  • 2022-12-23
  • 2021-07-22
  • 2021-06-18
  • 2021-06-23
相关资源
相似解决方案