python爬虫使用Selenium的准备工作之二:

之一就是Selenium的安装啦。

pip install 即可。

这里的之二是打开火狐:

driver = webdriver.Firefox(executable_path='/usr/lib/firefox/firefox')

executable_path是firefox的安装路径

可是我忘记了肿么破?

委屈。

 ps -ef|grep firefox

 

b2utyyo+  9824  9031 21 18:42 ?        00:22:44 /usr/lib/firefox/firefox http://www.ubuntukylin.com/ukylin/member.php?mod=register
b2utyyo+  9868  9031  0 18:42 ?        00:00:02 /usr/lib/firefox/firefox
hadoop   11322  1439  1 18:47 ?        00:01:13 /usr/lib/firefox/firefox
root     16251 14884  0 20:30 pts/20   00:00:00 grep --color=auto firefox

可以知道就是/usr/lib/firefox/firefox了

OK

火狐打开了

posted @ 2017-10-09 20:52  深圳地铁Princess  阅读(242)  评论(0编辑  收藏  举报