Skip to content

Commit

Permalink
Merge pull request #643
Browse files Browse the repository at this point in the history
Set a specific data_path for Patcher if the environment is AWS Lambda
  • Loading branch information
ultrafunkamsterdam authored Dec 17, 2022
2 parents a535fc9 + 5c98438 commit 5df8e00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
)
)
2 changes: 2 additions & 0 deletions undetected_chromedriver/patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit 5df8e00

Please sign in to comment.