Mozilla Firefox 用于 Selenium Scraping 的命令行安装
问题:Mozilla Firefox 用于 Selenium Scraping 的命令行安装
嗨,我有一个在本地运行的刮板,但是当尝试使用 Vagrant 机器在 AWS EC2 linux 环境中启动它时,我遇到了以下问题。
当我通过在 Linux 上运行对其进行测试时,我能够直接与 Firebug 一起下载 linux,然后运行我的 Selenium webdriver。在这种情况下,我正在编写一个包含必要安装的文件。但是,由于无法直接从命令行(以及 firebug)安装 firefox,我遇到了麻烦。
这就是我的工人错误的样子(它在我安装了 firefox 的本地机器上运行良好,在安装了它的 linux 上运行良好):
[worker] " Please specify the firefox binary location or install firefox")
[worker] RuntimeError: Could not find firefox in your system PATH. Please specify the firefox binary location or install firefox
我目前正在运行这样的东西来创建正确的开发环境。我想我可以使用 Mozmill 重新创建 firefox。有没有人遇到/解决过这个?
-
sudo easy_install pip
-
sudo pip install selenium
-
sudo pip install mozmill
我需要 Firefox 和 Firebug 的命令行安装。谢谢!
进步:
我现在正在使用sudo apt-get install firefox
,我相信它可能会起作用。如果不让 firebug 和 net export 也能正常工作,我就无法测试它的实际运行情况。我试过sudo apt-get install firebug
但找不到。据说在这里工作:http://www.daveshuck.com/2008/05/06/firebug-with-firefox-3-in-ubuntu-hardy-heron/但是它对我不起作用?
解答
Apt-get 是一个包管理器,但显然没有安装在您正在使用的 Linux 上。 “AWS EC2 包管理器”的快速谷歌告诉我,Amazon Linux 风格使用 yum 包管理器,因此“yum install firefox”应该可以让你到达那里。我不确定Firebug是否可以以相同的方式安装......
更多推荐
所有评论(0)