From fc25b8f0f935fc7c70104170cdea988167574079 Mon Sep 17 00:00:00 2001 From: Leon Date: Fri, 2 Jun 2023 21:24:30 +0200 Subject: [PATCH] Update patcher.py --- undetected_chromedriver/patcher.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/undetected_chromedriver/patcher.py b/undetected_chromedriver/patcher.py index aedbc68..1e73565 100644 --- a/undetected_chromedriver/patcher.py +++ b/undetected_chromedriver/patcher.py @@ -39,13 +39,14 @@ class Patcher(object): d = "~/.local/share/undetected_chromedriver" elif _platform.endswith("darwin"): if 'arm' in platform.processor(): - zip_name %= "mac_arm64 + zip_name %= "mac_arm64" else: zip_name %= "mac64" exe_name %= "" d = "~/Library/Application Support/undetected_chromedriver" else: - d = "~/.undetected_chromedriver" + raise Exception("Could not detect operating system or architecture. possibly it is not supported") + if "LAMBDA_TASK_ROOT" in os.environ: d = "/tmp/undetected_chromedriver" data_path = os.path.abspath(os.path.expanduser(d))