Skip to content

Commit

Permalink
updating Chrome download URL for M1 macs (#29)
Browse files Browse the repository at this point in the history
* updating Chrome download URL for M1 macs

* cover both old and new format

include check of chromedriver version to ensure chrome 106.0.5249.21 and older can still be downloaded

Co-authored-by: mentalisttraceur <mentalisttraceur@gmail.com>

Co-authored-by: mentalisttraceur <mentalisttraceur@gmail.com>
Co-authored-by: Mike J <theshadowmoose@gmail.com>
  • Loading branch information
3 people authored Jan 11, 2023
1 parent b3f0f0d commit 2c1e10e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyderman/drivers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ def get_url(
if not resolved_version:
raise ValueError(f"Unable to locate ChromeDriver version! [{version}]")
if _os == "mac-m1":
_os = "mac" # chromedriver_mac64_m1
_os_bit = "%s_m1" % _os_bit
_os = "mac"
version_tuple = tuple(map(int, resolved_version.split(".")))
if version_tuple > (106, 0, 5249, 21):
_os_bit = "_arm%s" % _os_bit # chromedriver_mac_arm64
else:
_os_bit = "%s_m1" % _os_bit # chromedriver_mac64_m1
download = _base_download.format(version=resolved_version, os=_os, os_bit=_os_bit)
return "chromedriver", download, resolved_version

Expand Down

0 comments on commit 2c1e10e

Please sign in to comment.