Update patcher.py

This commit is contained in:
Leon 2023-06-02 21:24:30 +02:00 committed by GitHub
parent 6cc54113ef
commit fc25b8f0f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -39,13 +39,14 @@ class Patcher(object):
d = "~/.local/share/undetected_chromedriver" d = "~/.local/share/undetected_chromedriver"
elif _platform.endswith("darwin"): elif _platform.endswith("darwin"):
if 'arm' in platform.processor(): if 'arm' in platform.processor():
zip_name %= "mac_arm64 zip_name %= "mac_arm64"
else: else:
zip_name %= "mac64" zip_name %= "mac64"
exe_name %= "" exe_name %= ""
d = "~/Library/Application Support/undetected_chromedriver" d = "~/Library/Application Support/undetected_chromedriver"
else: 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: if "LAMBDA_TASK_ROOT" in os.environ:
d = "/tmp/undetected_chromedriver" d = "/tmp/undetected_chromedriver"
data_path = os.path.abspath(os.path.expanduser(d)) data_path = os.path.abspath(os.path.expanduser(d))