Skip to content

Commit

Permalink
Merge pull request #3446 from seleniumbase/cdp-mode-patch-27
Browse files Browse the repository at this point in the history
CDP Mode - Patch 27
  • Loading branch information
mdmintz authored Jan 22, 2025
2 parents 4dd7cc7 + a45d180 commit 7c21383
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.34.0"
__version__ = "4.34.1"
1 change: 1 addition & 0 deletions seleniumbase/core/browser_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4909,6 +4909,7 @@ def get_local_driver(
IS_MAC
and hasattr(e, "args")
and isinstance(e.args, (list, tuple))
and len(e.args) > 0
and cert in e.args[0]
):
mac_certificate_error = True
Expand Down
17 changes: 16 additions & 1 deletion seleniumbase/undetected/patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import time
import zipfile
from contextlib import suppress
from seleniumbase.console_scripts import sb_install
from seleniumbase.fixtures import shared_utils

logger = logging.getLogger(__name__)
IS_POSIX = sys.platform.startswith(("darwin", "cygwin", "linux"))
Expand Down Expand Up @@ -106,7 +108,14 @@ def auto(self, executable_path=None, force=False, version_main=None):
release = self.fetch_release_number()
self.version_main = release.split(".")[0]
self.version_full = release
self.unzip_package(self.fetch_package())
if int(self.version_main) < 115:
self.unzip_package(self.fetch_package())
else:
sb_install.main(
override="chromedriver %s" % self.version_main,
intel_for_uc=shared_utils.is_arm_mac(),
force_uc=True,
)
return self.patch()

def patch(self):
Expand All @@ -121,6 +130,12 @@ def fetch_release_number(self):
path += "_%s" % self.version_main
path = path.upper()
logger.debug("Getting release number from %s" % path)
if self.version_main and int(self.version_main) > 114:
return (
sb_install.get_cft_latest_version_from_milestone(
str(self.version_main)
)
)
return urlopen(self.url_repo + path).read().decode()

def fetch_package(self):
Expand Down

0 comments on commit 7c21383

Please sign in to comment.