webdriverdownloader icon indicating copy to clipboard operation
webdriverdownloader copied to clipboard

Github API rate limit exceeded error

Open cubicbyte opened this issue 11 months ago • 0 comments

When I run python script with webdriverdownloader too much, this error starts to appear:

Traceback (most recent call last):
  File "D:\source\projects\reddit-account-generator\create_accounts.py", line 39, in <module>
    install_driver()
  File "D:\source\projects\reddit-account-generator\reddit_account_generator\__init__.py", line 13, in install_driver
    webdriverdownloader.GeckoDriverDownloader().download_and_install()
  File "D:\Programs\Python3.11.0\Lib\site-packages\webdriverdownloader\webdriverdownloader.py", line 174, in download_and_install
    filename_with_path = self.download(version,
                         ^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Programs\Python3.11.0\Lib\site-packages\webdriverdownloader\webdriverdownloader.py", line 129, in download
    download_url = self.get_download_url(version, os_name=os_name, bitness=bitness)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Programs\Python3.11.0\Lib\site-packages\webdriverdownloader\webdriverdownloader.py", line 318, in get_download_url
    raise RuntimeError(info_message)
RuntimeError: Error, unable to find a download for os: win

Looking into the code I realized that your library makes a request to the page below each time, where the following error appears:

изображение

I suggest a solution: cache requests or add some proper error for this scenario, for example "You have exceeded the request limit, try again later"

cubicbyte avatar Jul 28 '23 09:07 cubicbyte