我正在尝试运行此脚本
import crawler
crawler.crawl(url="https://www.montratec.com",output_dir="crawling_test",method="rendered-all")
从该库: https://github.com/SimFin/pdf-crawler
但我得到了这个错误:
Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
我已经安装了Firefox,并且正在使用Windows
如果您将Firefox安装在系统搜索路径之外的非默认位置,则可以在moz:firefoxOptions功能对象(在自述文件中记录)上指定二进制字段,或者在启动时使用传递给geckodriver的二进制路径标志
由于已标记Selenium,您可以执行以下更改以消除上述错误:-
这是纯selenium解决方案,如果您有一个正在运行的驱动程序实例,请使用如下
FirefoxOptions
重新配置它:用于爬虫程序(基于py3 asyncio和aiohttp库的Web抓取框架)
安装:
示例代码:
正式参考here
相关问题 更多 >
编程相关推荐