在Heroku上,chromedriver buildpack不支持chrome buildpack。

3
我使用Python编写了一个网络爬虫。
为了在Heroku上部署它,我参考了这篇文章: https://www.andressevilla.com/running-chromedriver-with-python-selenium-on-heroku/, 并添加了这些构建包。 https://github.com/heroku/heroku-buildpack-google-chrome https://github.com/heroku/heroku-buildpack-chromedriver 但是当我在Heroku上运行代码时,出现了以下错误。 看起来chromedriver构建包不支持chrome构建包。
是否有其他构建包可用?或者我可以尝试其他方式来解决这个问题?
谢谢!
1个回答

5

Heroku Chrome Driver Buildpack 允许您选择 Chrome Driver 的版本,但默认情况下应该已安装最新可用的版本。您可以设置配置变量(环境变量)CHROMEDRIVER_VERSION=89.0.4389.23 以下载适用于 Chrome 89 的 chromedriver 版本。添加变量后,您需要重新部署以使更改生效。


好的,我设置了配置变量并再次推送。 然后它就可以工作了! 谢谢!!! - jen jojo
嗨 @jenjojo,我在这个问题上卡住了 https://stackoverflow.com/questions/77525230/test-is-running-fine-on-heroku-cli-but-on-heroku-ui-test-run-is-failing请求你帮帮我。 - undefined

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接