Merge pull request #643

Set a specific data_path for Patcher if the environment is AWS Lambda
This commit is contained in:
Leon 2022-12-17 19:02:16 +00:00 committed by GitHub
commit 5df8e00a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -61,4 +61,4 @@ setup(
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
)
)

View File

@ -39,6 +39,8 @@ class Patcher(object):
if platform.endswith("win32"):
d = "~/appdata/roaming/undetected_chromedriver"
elif 'LAMBDA_TASK_ROOT' in os.environ:
d = "/tmp/undetected_chromedriver"
elif platform.startswith("linux"):
d = "~/.local/share/undetected_chromedriver"
elif platform.endswith("darwin"):