gpt4 book ai didi

python - 无法安装ABP爬虫

转载 作者:行者123 更新时间:2023-12-01 04:39:55 26 4
gpt4 key购买 nike

我在尝试安装 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 并且能够克隆构建工具存储库。

最佳答案

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

OSError: [Errno 2] No such file or directory

ABP Crawler 需要安装 Firefox,它会自动执行 Firefox 来收集数据。如果实际安装了 Firefox,路径可能是 /usr/local/bin/firefox 或类似的路径。如果您不确定,可以从命令行运行 which firefox

关于python - 无法安装ABP爬虫,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30945620/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com