无法为ABP安装爬虫

Cannot install crawler for ABP

我在尝试安装 abpcrawler(下面的存储库)时遇到错误。

https://github.com/adblockplus/abpcrawler

当运行命令

./run.py -b /usr/bin/firefox urls.txt outputdir

我收到以下错误:

bash-3.2# ./run.py -b /usr/bin/firefox urls.txt outputdir
Communicating with client on port 29922
['/usr/bin/firefox', '--crawler-port', '29922', '-foreground', '-profile', '/tmp/tmpgZYg1r.mozrunner']
Traceback (most recent call last):
  File "./run.py", line 195, in <module>
    run()
  File "./run.py", line 178, in run
    runner.start()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mozrunner/base/browser.py", line 67, in start
    BaseRunner.start(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mozrunner/base/runner.py", line 102, in start
    self.process_handler.run(self.timeout, self.output_timeout)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mozprocess/processhandler.py", line 700, in run
    self.proc = self.Process([self.cmd] + self.args, **args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mozprocess/processhandler.py", line 103, in __init__
    universal_newlines, startupinfo, creationflags)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

我错过了什么吗?我安装了 Mercurial 并且能够克隆构建工具 repo。

从错误信息来看,/usr/bin/firefox无法启动,因为:

OSError: [Errno 2] No such file or directory

A​​BP Crawler 需要安装 Firefox,它将自动运行 Firefox 以收集数据。如果确实安装了 Firefox,则路径可能是 /usr/local/bin/firefox 或类似的东西。如果您不确定,可以从命令行 运行 which firefox