Selenium WebDriver Firefox错误:超出API速率限制。您必须添加gh_token

发布于 2025-02-01 05:22:53 字数 674 浏览 5 评论 0 原文

使用示例测试代码来自,我试图运行此代码:

def test_firefox_session():
service = FirefoxService(executable_path=GeckoDriverManager().install())

driver = webdriver.Firefox(service=service)

driver.quit()

测试是作为一个失败的测试,错误:

valueerror:API速率限制超过。您必须添加gh_token !!!

Chrome和Edge浏览器的测试用例成功。

任何帮助都非常感谢,最好使用WebDriver-Manager

版本: 硒:4.1.5 WebDriver_Manager:3.7.0 Python:3.10 Firefox:100.0

Using the sample test code from SeleniumHQ github, I tried to run this code:

def test_firefox_session():
service = FirefoxService(executable_path=GeckoDriverManager().install())

driver = webdriver.Firefox(service=service)

driver.quit()

The test resulted as a failed test, with the error:

ValueError: API Rate limit exceeded. You have to add GH_TOKEN!!!

The test cases for Chrome and Edge browsers were successful.

Any help is much appreciated, preferably using webdriver-manager

Versions:
Selenium: 4.1.5
webdriver_manager: 3.7.0
python: 3.10
Firefox: 100.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

許願樹丅啲祈禱 2025-02-08 05:22:53

您需要生成一个github令牌,然后将其传递给.env。更多详细信息在WebDriver_Manager存储库中

You need to generate a github token and then pass it to .env. More details are inside the webdriver_manager repository https://github.com/SergeyPirogov/webdriver_manager#gh_token

本宫微胖 2025-02-08 05:22:53

Firefox驱动程序存储在Github中。 GITHUB具有API调用的速率限制,因此要增加这些限制,您必须提供GitHub令牌。请参阅此处的更多信息 https://github.com/sergeypirogogogogogogog/webdriver_manager_manager#gh_token

Firefox drivers are stored in Github. A GitHub has a rate limit for API calls, so to increase these limits you have to provide a Github token. See more info here https://github.com/SergeyPirogov/webdriver_manager#gh_token

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文