Merge pull request #643
Set a specific data_path for Patcher if the environment is AWS Lambda
This commit is contained in:
commit
5df8e00a5a
2
setup.py
2
setup.py
|
@ -61,4 +61,4 @@ setup(
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
],
|
],
|
||||||
)
|
)
|
|
@ -39,6 +39,8 @@ class Patcher(object):
|
||||||
|
|
||||||
if platform.endswith("win32"):
|
if platform.endswith("win32"):
|
||||||
d = "~/appdata/roaming/undetected_chromedriver"
|
d = "~/appdata/roaming/undetected_chromedriver"
|
||||||
|
elif 'LAMBDA_TASK_ROOT' in os.environ:
|
||||||
|
d = "/tmp/undetected_chromedriver"
|
||||||
elif platform.startswith("linux"):
|
elif platform.startswith("linux"):
|
||||||
d = "~/.local/share/undetected_chromedriver"
|
d = "~/.local/share/undetected_chromedriver"
|
||||||
elif platform.endswith("darwin"):
|
elif platform.endswith("darwin"):
|
||||||
|
|
Loading…
Reference in New Issue